Subject: Re: bug#52493: 29.0.50; Setting Inconsolata up in init.el makes default face rendered wrong

From: Dmitry Gutov <[email-masked]>
Date: Fri, 13 Jan 2023 01:53:58 +0200

On 12/01/2023 11:46, Robert Pluim wrote:
>>>>>> On Thu, 12 Jan 2023 10:31:35 +0100, martin rudalics<[email-masked]>  said:
>      >> So... the window manager works with "unscaled" pixels it has to multiply by 2? That's why we try to send half the actual value?
>      martin> We send half the actual value because Robert (IIRC) has coded it that
>      martin> way.  I never scale here and so I can't tell whether that's the right
>      martin> approach.  Have a look at Bug#20432 where Jan says something about GTK
>      martin> messing things up.
> 
> Itʼs done that way because thatʼs the way it works, not because of any
> decision on my part. When scaling is in use, a screen that has eg
> 1920x1080 "physical pixels" is presented to us as being 960x540
> "virtual pixels". Since Emacs uses physical pixels internally, we need
> to divide all the numbers by 2.

But depending on the scaling of the display, the :height attribute of a 
face translates to a different height value in pixels, doesn't it?

So at some point there has to be some scaling up performed first. I 
suppose the uneven height of a font in pixels might be picked up because 
that's the closest available shape, but perhaps the "actual" doubled 
height value might be used for line height etc?

I'm just guessing, sorry if that's way off.