mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-10 01:51:09 +00:00
fontconfig: ignore failure to return FC_INDEX assume its zero
Sigh. The number of creative ways Linux systems can be broken. See #10112
This commit is contained in:
parent
6839281277
commit
40ed8cfd3c
1 changed files with 1 additions and 1 deletions
|
|
@ -330,7 +330,7 @@ _native_fc_match(FcPattern *pat, FontConfigFace *ans) {
|
|||
FcChar8 *out;
|
||||
#define g(func, prop, output) if (func(match, prop, 0, &output) != FcResultMatch) { PyErr_SetString(PyExc_ValueError, "No " #prop " found in fontconfig match result"); goto end; }
|
||||
g(FcPatternGetString, FC_FILE, out);
|
||||
g(FcPatternGetInteger, FC_INDEX, ans->index);
|
||||
if (FcPatternGetInteger(match, FC_INDEX, 0, &ans->index) != FcResultMatch) ans->index = 0; // ignore missing index assume it is zero
|
||||
g(FcPatternGetInteger, FC_HINT_STYLE, ans->hintstyle);
|
||||
g(FcPatternGetBool, FC_HINTING, ans->hinting);
|
||||
#undef g
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue