emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exposing x_get_scale_factor into elisp level


From: Alan Third
Subject: Re: exposing x_get_scale_factor into elisp level
Date: Wed, 24 Mar 2021 20:27:11 +0000

On Mon, Mar 22, 2021 at 02:07:41AM +0300, Evgeny Zajcev wrote:
> HiDPI is very common nowadays.  Internally Emacs has decent support for
> HiDPI displays.  However elisp code, that generates non-svg images don't
> have any idea that logical pixel may differ from physical one, resulting in
> generating images in low resolution on HiDPI displays.
> 
> Emacs internally has a notion about HiDPI displays, such as
> `x_get_scale_factor`, maybe expose this function to elisp level, so
> packages may utilize it to generate images in highres?

On NS platforms (macOS and GNUstep) and, I believe, native GTK the
scale factor is how much the TOOLKIT scales things up for display.

But on plain X it's actually how much YOU have to scale things up to
get to "logical" pixels. Emacs on X only uses the logical sizes for
the toolbar and possibly some other window chrome, and then only on
GTK builds.

I couldn't work out how to reconcile the two approaches, and didn't
actually need it for the SVG work, so I forgot about it. It may make
sense to just ignore this stuff on X once we have PGTK merged.

Windows appears to be completely different, providing some three or
four different approaches to HiDPI.
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]