diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2013-07-28 09:30:05 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2013-07-28 09:30:05 +0930 |
commit | 274863be08f6c8df6d411df9db725d34f7fbabea (patch) | |
tree | 2b5eda46cefd8942a8fd00c0828dfdf4f0acfd20 | |
parent | 03c81d414d4edb710c91f96ddb7dbf73e5432583 (diff) |
type1-subset: Don't try to rename non winansi glyphs
When the latin subset contains glyphs that use the seac operator to
combine two glyphs, additional non winansi glyphs are added to the
subset. These extra glyphs do not have a winansi name so they can't
be renamed.
Based on a patch by Salvador Ortiz.
Bug 67324
-rw-r--r-- | src/cairo-type1-subset.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c index e2c799dda..4b6440302 100644 --- a/src/cairo-type1-subset.c +++ b/src/cairo-type1-subset.c @@ -1130,6 +1130,7 @@ write_used_glyphs (cairo_type1_font_subset_t *font, int length; int subset_id; int ch; + const char *wa_name; if (font->glyphs[glyph_number].subset_index < 0) return CAIRO_STATUS_SUCCESS; @@ -1143,8 +1144,15 @@ write_used_glyphs (cairo_type1_font_subset_t *font, subset_id = font->glyphs[glyph_number].subset_index; if (subset_id > 0) { ch = font->scaled_font_subset->to_latin_char[subset_id]; - name = _cairo_winansi_to_glyphname (ch); - name_length = strlen(name); + wa_name = _cairo_winansi_to_glyphname (ch); + /* If this subset contains any seac glyphs, additional non + * winansi glyphs (wa_name = NULL) may be included in the + * subset. In this case the original name is used. + */ + if (wa_name) { + name = wa_name; + name_length = strlen(name); + } } } |