From bfea3a67b4b0818893619e995b3f80a206b31c21 Mon Sep 17 00:00:00 2001 From: Scott Lasley Date: Fri, 18 Aug 2017 15:57:57 -0400 Subject: [PATCH] Add an entry for .notdef to CharStrings dictionary for type 42 fonts in eps files. See issue #9044 --- extern/ttconv/pprdrv_tt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extern/ttconv/pprdrv_tt.cpp b/extern/ttconv/pprdrv_tt.cpp index 1f906e85be83..b471e93743ce 100644 --- a/extern/ttconv/pprdrv_tt.cpp +++ b/extern/ttconv/pprdrv_tt.cpp @@ -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::const_iterator i = glyph_ids.begin();