Skip to content

Commit 4d3794e

Browse files
committed
text-freetype2: Fix FC_INDEX retrieval
FcPatternGetInteger was called with value list index 1 instead of 0, requesting a non-existent second value. For TTC/OTC font collections where the matched face has a non-zero index, this caused the wrong face to be loaded — potentially one with incomplete character coverage, resulting in missing glyphs.
1 parent 7272af1 commit 4d3794e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/text-freetype2/find-font-unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const char *get_font_path(const char *family, uint16_t size, const char *style,
5959
FcStrFree(path);
6060

6161
int fc_index = 0;
62-
FcPatternGetInteger(match, FC_INDEX, 1, &fc_index);
62+
FcPatternGetInteger(match, FC_INDEX, 0, &fc_index);
6363
*idx = (FT_Long)fc_index;
6464

6565
FcPatternDestroy(match);

0 commit comments

Comments
 (0)