10000 Add an entry for .notdef to CharStrings dictionary for type 42 fonts … · matplotlib/matplotlib@bfea3a6 · GitHub
[go: up one dir, main page]

Skip to content

Commit bfea3a6

Browse files
Scott LasleyScott E Lasley
authored andcommitted
Add an entry for .notdef to CharStrings dictionary for type 42 fonts in eps files. See issue #9044
1 parent 225a4a0 commit bfea3a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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+
/* Section 5.8.2 table 5.7 of the PS Language Ref says a CharStrings dictionary 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)
0