summaryrefslogtreecommitdiff
path: root/src/cairo-scaled-font-subsets.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2010-10-01 17:57:43 +0930
committerAdrian Johnson <ajohnson@redneon.com>2010-10-01 19:15:30 +0930
commit01ee091ee98bc0544d9a3d5665cdecddd8f368cc (patch)
tree4d5ccfdc08dfda31d1e0e9d1624a4eea309ffb3e /src/cairo-scaled-font-subsets.c
parente62891cd8f27b62c3ee04d822524c9cee69a2e62 (diff)
downloadcairo-01ee091ee98bc0544d9a3d5665cdecddd8f368cc.tar.gz
Add winansi glyph names
for the PS backend and Type 1 subsetters to use with latin fonts.
Diffstat (limited to 'src/cairo-scaled-font-subsets.c')
-rw-r--r--src/cairo-scaled-font-subsets.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 3478351e7..24a700a0f 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -1184,7 +1184,12 @@ _cairo_scaled_font_subset_create_glyph_names (cairo_scaled_font_subset_t *subset
}
if (utf16_len == 1) {
- snprintf (buf, sizeof (buf), "uni%04X", (int) utf16[0]);
+ int ch = _unicode_to_winansi (utf16[0]);
+ if (ch > 0)
+ strncpy (buf, _cairo_winansi_to_glyphname (ch), sizeof (buf));
+ else
+ snprintf (buf, sizeof (buf), "uni%04X", (int) utf16[0]);
+
_cairo_string_init_key (&key, buf);
entry = _cairo_hash_table_lookup (names, &key.base);
if (entry != NULL)