8000 textpath.py: fix an issue that warning is displayed when charcode is 0 · matplotlib/matplotlib@a1bc26a · GitHub
[go: up one dir, main page]

Skip to content

Commit a1bc26a

Browse files
committed
textpath.py: fix an issue that warning is displayed when charcode is 0
1 parent 4c57add commit a1bc26a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/textpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,
359359
if enc: charcode = enc.get(glyph, None)
360360
else: charcode = glyph
361361

362-
if charcode:
362+
if charcode is not None:
363363
glyph0 = font.load_char(charcode, flags=ft2font_flag)
364364
else:
365365
warnings.warn("The glyph (%d) of font (%s) cannot be converted with the encoding. Glyph may be wrong" % (glyph, font_bunch.filename))

0 commit comments

Comments
 (0)
0