GNU bug report logs -
#52888
29.0.50; font_{delete_unmatched,score} do not handle nil FONT_WEIGHT_INDEX
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Thu, 30 Dec 2021 05:29:01 UTC
Severity: normal
Found in version 29.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 3 years and 125 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.