Skip to content

Commit

Permalink
Add an entry for .notdef to CharStrings dictionary for type 42 fonts …
Browse files Browse the repository at this point in the history
…in eps files. See issue matplotlib#9044
  • Loading branch information
Scott Lasley authored and Scott E Lasley committed Aug 20, 2017
1 parent 225a4a0 commit bfea3a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extern/ttconv/pprdrv_tt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,9 @@ void ttfont_CharStrings(TTStreamWriter& stream, struct TTFONT *font, std::vector
post_format = getFixed( font->post_table );

/* Emmit the start of the PostScript code to define the dictionary. */
stream.printf("/CharStrings %d dict dup begin\n", glyph_ids.size());
stream.printf("/CharStrings %d dict dup begin\n", glyph_ids.size()+1);
/* Section 5.8.2 table 5.7 of the PS Language Ref says a CharStrings dictionary must contain an entry for .notdef */
stream.printf("/.notdef 0 def\n");

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

0 comments on commit bfea3a6

Please sign in to comment.