Skip to content

Commit 8b6a6cc

Browse files
author
Scott Lasley
committed
Add entry for .notdef to CharStrings for type 42 fonts in eps files. See issue matplotlib#9044
1 parent 225a4a0 commit 8b6a6cc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎extern/ttconv/pprdrv_tt.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,9 @@ void ttfont_CharStrings(TTStreamWriter& stream, struct TTFONT *font, std::vector
10551055
post_format = getFixed( font->post_table );
10561056

10571057
/* Emmit the start of the PostScript code to define the dictionary. */
1058-
stream.printf("/CharStrings %d dict dup begin\n", glyph_ids.size());
1058+
stream.printf("/CharStrings %d dict dup begin\n", glyph_ids.size()+1);
1059+
/* PS Lang Ref says ChatStrings must contain an entry for .notdef */
1060+
stream.printf("/.notdef 0 def\n");
10591061

10601062
/* Emmit one key-value pair for each glyph. */
10611063
for (std::vector<int>::const_iterator i = glyph_ids.begin();

0 commit comments

Comments
 (0)