Skip to content

Commit 7eebaf8

Browse files
committed
Fix PS Type 3 font output -- the custom encoding seems to cause more trouble than it's worth.
svn path=/trunk/matplotlib/; revision=8186
1 parent 326bfb1 commit 7eebaf8

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

ttconv/pprdrv_tt.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -420,19 +420,21 @@ void ttfont_header(TTStreamWriter& stream, struct TTFONT *font)
420420
-------------------------------------------------------------*/
421421
void ttfont_encoding(TTStreamWriter& stream, struct TTFONT *font, std::vector<int>& glyph_ids, font_type_enum target_type)
422422
{
423-
if (target_type == PS_TYPE_3) {
424-
stream.printf("/Encoding [ ");
423+
stream.putline("/Encoding ISOLatin1Encoding def");
425424

426-
for (std::vector<int>::const_iterator i = glyph_ids.begin();
427-
i != glyph_ids.end(); ++i) {
428-
const char* name = ttfont_CharStrings_getname(font, *i);
429-
stream.printf("/%s ", name);
430-
}
425+
// if (target_type == PS_TYPE_3) {
426+
// stream.printf("/Encoding [ ");
431427

432-
stream.printf("] def\n");
433-
} else {
434-
stream.putline("/Encoding StandardEncoding def");
435-
}
428+
// for (std::vector<int>::const_iterator i = glyph_ids.begin();
429+
// i != glyph_ids.end(); ++i) {
430+
// const char* name = ttfont_CharStrings_getname(font, *i);
431+
// stream.printf("/%s ", name);
432+
// }
433+
434+
// stream.printf("] def\n");
435+
// } else {
436+
// stream.putline("/Encoding StandardEncoding def");
437+
// }
436438
} /* end of ttfont_encoding() */
437439

438440
/*-----------------------------------------------------------

0 commit comments

Comments
 (0)