bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#70055: 30.0.50; Column uniformity when using vtable with a variable-


From: Adam Porter
Subject: bug#70055: 30.0.50; Column uniformity when using vtable with a variable-pitch font
Date: Sat, 6 Apr 2024 20:22:11 -0500
User-agent: Mozilla Thunderbird

Hi Eli, John,

On 4/6/24 04:24, Eli Zaretskii wrote:

You use face-remap-add-relative, but you also use absolute height values for the fonts. I don't think face-remapping will work in these situations, because for it to work the font heights must be defined in relative terms, not absolute terms.

Adam, am I missing something here?  Is this specific to vtable?

I'm not sure what's going on.  As best I can tell, either this example
code doesn't do what's intended, or I misunderstand what's intended.

I am confused because the "with-variable-font" frame, in the screenshot
and in my own testing, causes the vtable's text to be displayed without
a variable-pitch font, not with one.  Maybe that is what is intended, in
which case I don't know what the problem is.

But in that case, it might be easier to achieve the desired effect by
adjusting the `vtable' face, which inherits from `variable-pitch'...

...and that might point to the problem: `(elisp)Face Remapping' says:

     Note that buffer-local face remapping does not work reliably for
     parent faces of basic faces (*note Basic Faces::).  (These are the
     faces that are used in mode lines, header lines, and other basic
     decorations of windows and frames.)  For instance,
     ‘mode-line-inactive’ inherits from ‘mode-line’, but remapping
     ‘mode-line’ won’t normally have the desired effect on
     ‘mode-line-inactive’, especially if done locally for some buffers.
     Instead you have to remap ‘mode-line-inactive’ directly.

Since the `vtable' face inherits from `variable-pitch', maybe remapping
`variable-pitch' isn't working as intended. But I have little knowledge about face remapping, and, e.g. the limitation Eli mentions about font heights being defined in relative terms--I can't find that mentioned in the manual--so I'm likely not the best person to ask.

Note also that the call to `face-remap-add-relative' does not appear to
be according to the expected signature; it's unclear to me what effect
that call is actually having.  When I adjust it to, e.g.

  (face-remap-add-relative 'vtable :font "Arial" :weight 'thin
                           :height 1.2)

It appears to have a different effect.

Finally, I don't have the specific fonts used in the example, making it hard to reproduce.

Anyway, I hope this helps somehow.

Thanks,
Adam





reply via email to

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