summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2006-10-15 23:09:35 +0930
committerCarl Worth <cworth@cworth.org>2006-11-02 13:02:02 -0800
commitd883217773913f3f6fc67e8ce97737ddd53b0d28 (patch)
treed23f8bb827ea9a946bc40f2b0d769f29fe1232de
parentdf7faeff4e4bbb66c0651a066b694581c4165ad3 (diff)
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. (cherry picked from 753763ff258760688ef5a594a204fa8f2be7e4a4 commit)
-rw-r--r--src/cairo-type1-subset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index 6f1be2cd2..6e9afab72 100644
--- a/src/cairo-type1-subset.c
+++ b/src/cairo-type1-subset.c
@@ -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,