8000 Suppress a spurious missing-glyph warning with ft2font. · matplotlib/matplotlib@3ba2e6d · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ba2e6d

Browse files
committed
Suppress a spurious missing-glyph warning with ft2font.
`FT_Get_Char_Index(face, 0)` returns 0; that doesn't warrant a warning.
1 parent 9324b27 commit 3ba2e6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ft2font.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ inline double conv(long v)
168168
FT_UInt ft_get_char_index_or_warn(FT_Face face, FT_ULong charcode)
169169
{
170170
FT_UInt glyph_index = FT_Get_Char_Index(face, charcode);
171-
if (!glyph_index) {
171+
if (charcode && !glyph_index) {
172172
PyErr_WarnEx(NULL, "Required glyph missing from current font.", 1);
173173
}
174174
return glyph_index;

0 commit comments

Comments
 (0)
0