From 3ba2e6d5935ece346b12f2e82db70de4b528b101 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 9 Jul 2018 11:35:50 +0200 Subject: [PATCH] Suppress a spurious missing-glyph warning with ft2font. `FT_Get_Char_Index(face, 0)` returns 0; that doesn't warrant a warning. --- src/ft2font.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ft2font.cpp b/src/ft2font.cpp index 4e30da77ef46..02f6b6ac4686 100644 --- a/src/ft2font.cpp +++ b/src/ft2font.cpp @@ -168,7 +168,7 @@ inline double conv(long v) FT_UInt ft_get_char_index_or_warn(FT_Face face, FT_ULong charcode) { FT_UInt glyph_index = FT_Get_Char_Index(face, charcode); - if (!glyph_index) { + if (charcode && !glyph_index) { PyErr_WarnEx(NULL, "Required glyph missing from current font.", 1); } return glyph_index;