Type1 subsetting: Don't put .notdef in Encoding when there are 256 glyphs

Type1 subsetting adds the .notdef glyph to the subset because the Type 1
spec requires that it be defined. However if the subset already has
256 glyphs, this will cause the Encoding vector to have 257 entries
which ghostscript does not like.
This commit is contained in:
Adrian Johnson 2006-10-15 23:09:35 +09:30
parent 216c759d46
commit 753763ff25

View file

@ -280,7 +280,7 @@ cairo_type1_font_subset_write_header (cairo_type1_font_subset_t *font,
_cairo_output_stream_printf (font->output,
"/Encoding 256 array\n"
"0 1 255 {1 index exch /.notdef put} for\n");
for (i = 0; i < font->base.num_glyphs; i++) {
for (i = 1; i < font->base.num_glyphs; i++) {
if (font->glyphs[i].subset_index < 0)
continue;
_cairo_output_stream_printf (font->output,