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

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

bug#52888: 29.0.50; font_{delete_unmatched,score} do not handle nil FONT


From: Sean Whitton
Subject: bug#52888: 29.0.50; font_{delete_unmatched,score} do not handle nil FONT_WEIGHT_INDEX
Date: Thu, 30 Dec 2021 10:13:13 -0700
User-agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu)

Hello,

On Thu 30 Dec 2021 at 09:33am +02, Eli Zaretskii wrote:

> Is the patch supposed to allow Emacs to handle these fonts, or is it
> just the protection against assertion violations?

The latter -- the code implicitly assumes that the weight will always be
a fixnum, but that is not so.  I want to fix that implicit assumption.

> If the latter, isn't it better to teach the font driver to handle
> these fonts correctly?
>
> AFAIU, your patch basically will cause Emacs to reject such fonts and
> not use them, which is tantamount to telling users to configure Emacs
> to ignore them via, say, face-ignored-fonts.  Is that right, or am I
> missing something?

I don't think it is equivalent to face-ignored-fonts.  The weight field
in the entity vector is examined only when the weight field in the font
spec is non-nil.  So my code does not categorically reject these fonts:
it rejects them only when the user requested a specific weight, AFAICT.

I don't know enough about these variable weight TTFs to judge whether it
is worth anyone's time adding better support for them in Emacs.  In the
case of Inconsolata-VariableFont_wdth,wght.ttf, the font authors provide
separate .ttf files for each weight too, so there doesn't seem to be an
expectation that applications know how to read the combined file.

Thanks for looking!

-- 
Sean Whitton





reply via email to

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