[cairo-commit] src/cairo-type1-subset.c
Adrian Johnson
ajohnson at kemper.freedesktop.org
Sat Jul 27 17:12:08 PDT 2013
src/cairo-type1-subset.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 274863be08f6c8df6d411df9db725d34f7fbabea
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Sun Jul 28 09:30:05 2013 +0930
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
diff --git a/src/cairo-type1-subset.c b/src/cairo-type1-subset.c
index e2c799d..4b64403 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);
+ }
}
}
More information about the cairo-commit
mailing list