Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21bbf8c

Browse files
authored
Merge pull request #9059 from selasley/ps-type42-fix
Add entry for .notdef to CharStrings for type 42 fonts in eps files. …
2 parents 61217cf + bfea3a6 commit 21bbf8c

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)