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: Fri, 31 Dec 2021 19:35:53 -0700
User-agent: Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu)

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





reply via email to

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