Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit722de6f

Browse files
committed
Properly warn when glyph is not in encoding.
1 parentc5f2bbe commit722de6f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎lib/matplotlib/textpath.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,15 @@ def get_glyphs_tex(self, prop, s, glyph_map=None,
312312
font.set_size(self.FONT_SCALE,self.DPI)
313313
# See comments in _get_ps_font_and_encoding.
314314
ifencisnotNone:
315-
index=font.get_name_index(enc[glyph])
316-
font.load_glyph(index,flags=LOAD_TARGET_LIGHT)
315+
ifglyphnotinenc:
316+
_log.warning(
317+
"The glyph %d of font %s cannot be converted with "
318+
"the encoding; glyph may be wrong.",
319+
glyph,font.fname)
320+
font.load_char(glyph,flags=LOAD_TARGET_LIGHT)
321+
else:
322+
index=font.get_name_index(enc[glyph])
323+
font.load_glyph(index,flags=LOAD_TARGET_LIGHT)
317324
else:
318325
index=glyph
319326
font.load_char(index,flags=LOAD_TARGET_LIGHT)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp