Use buffer size in cell_as_unicode_for_fallback as well

This commit is contained in:
Kovid Goyal
2025-02-16 10:02:39 +05:30
parent b4b2b44c92
commit 96d231dfa5
3 changed files with 4 additions and 4 deletions

View File

@@ -505,7 +505,7 @@ create_fallback_face(PyObject UNUSED *base_face, const ListOfChars *lc, bool bol
if (!emoji_presentation && bold) { AP(FcPatternAddInteger, FC_WEIGHT, FC_WEIGHT_BOLD, "weight"); }
if (!emoji_presentation && italic) { AP(FcPatternAddInteger, FC_SLANT, FC_SLANT_ITALIC, "slant"); }
if (emoji_presentation) { AP(FcPatternAddBool, FC_COLOR, true, "color"); }
size_t num = cell_as_unicode_for_fallback(lc, char_buf);
size_t num = cell_as_unicode_for_fallback(lc, char_buf, arraysz(char_buf));
add_charset(pat, num);
d = _fc_match(pat);
face_from_descriptor: