Subject: Re: bug#19194: 24.4.50; `window-body-width' is not dynamic relative to font size changes

From: Eli Zaretskii <[email-masked]>
Date: Thu, 27 Nov 2014 20:46:36 +0200

> Date: Thu, 27 Nov 2014 19:35:38 +0100
> From: martin rudalics <[email-masked]>
> CC: [email-masked], [email-masked]
> 
>  >> AFAICT this does not change the height of the default face - it affects
>  >> how the display engine calculates the height of text when displaying a
>  >> buffer current at the time `text-scale-adjust' was called.
>  >
>  > No, it works via face remapping, see text-scale-mode.  IOW, it does
>  > change the height of the default face by replacing it with another
>  > face.
> 
> On a per-buffer basis.  The height of the default face is unaffected
> here.

We both talk about the "default face", but mean 2 different things, it
seems.  I mean the face that is referenced by 'default'.

> I suppose the display engine applies the scaling lazily, whenever it
> has to retrieve the height of the default face.

The display engine doesn't apply the scaling at all, it just uses the
face and obeys its attributes.  text-scale-mode prepares that face,
like this:

    (face-remap-add-relative 'default
                             :height
                             (expt text-scale-mode-step
                                   text-scale-mode-amount))