[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: |
Wed, 29 Dec 2021 22:28:37 -0700 |
User-agent: |
Notmuch/0.31.4 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
Hello,
On my system I have a variable weight .ttf font[1] installed somewhere.
When I build with --enable-check-lisp-object-type, the line
int candidate = XFIXNUM (AREF (entity, prop)) >> 8;
in font_delete_unmatched and the expression
EMACS_INT diff = ((XFIXNUM (AREF (entity, i)) >> 8)
- (XFIXNUM (spec_prop[i]) >> 8));
in font_score have failed assertions because the FONT_WEIGHT_INDEX for
this .ttf file is nil:
#<font-entity ftcrhb CYRE Inconsolata nil iso10646-1 nil normal nil
0 nil 100 0 ((:font-entity
"/usr/share/fonts/inconsolata/Inconsolata-VariableFont_wdth,wght.ttf"
. 0))>
I don't believe Emacs really knows how to handle these multi-weight .ttf
files? Thus I propose the attached patch, to handle the value.
[1] https://github.com/googlefonts/Inconsolata/tree/main/fonts/variable
--
Sean Whitton
0001-Handle-nil-FONT_WEIGHT_INDEX.patch
Description: Text Data
- bug#52888: 29.0.50; font_{delete_unmatched,score} do not handle nil FONT_WEIGHT_INDEX,
Sean Whitton <=