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
Message #20 received at 52888 <at> debbugs.gnu.org (full text, mbox):
Hello,
On Fri 31 Dec 2021 at 05:30PM -07, Sean Whitton wrote:
> The ftcrhb backend returns a FcPattern for each of the weights contained
> in Inconsolata-VariableFont_wdth,wght.ttf. So Emacs does not need to
> learn anything special about these variable weight files in order to
> support them, I think. However, this code in ftfont_pattern_entity can
> sometimes set FONT_WEIGHT_INDEX to nil:
>
> if (FcPatternGetInteger (p, FC_WEIGHT, 0, &numeric) == FcResultMatch)
> {
> FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX, make_fixnum (numeric));
> }
... or FcPatternGetInteger returns something other than FcResultMatch,
which is in fact what is happening.
I tried FcPatternGetDouble in an else branch and that fails too, so it
seems fontconfig cannot determine a weight for the variant in question.
So, perhaps each of the if (FcPatternGetInteger (...)) conditionals that
corresponds to one of the FONT_* fields that the font.c functions assume
are fixnums should have an else branch to return Qnil?
--
Sean Whitton
This bug report was last modified 3 years and 124 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.