summaryrefslogtreecommitdiff
path: root/lily/ttf.cc
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>2006-03-30 10:48:35 +0000
committerHan-Wen Nienhuys <hanwen@xs4all.nl>2006-03-30 10:48:35 +0000
commit36e2a74b696daf33c0d3c71d27a4e0a4c760ff04 (patch)
treee1d330bec9589dd9dcd70b4d26ee17a28bc427ba /lily/ttf.cc
parentcd586e589daa7a550fa39200a78cb2012e853d99 (diff)
*** empty log message ***
Diffstat (limited to 'lily/ttf.cc')
-rw-r--r--lily/ttf.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/lily/ttf.cc b/lily/ttf.cc
index bdd4eda88d..9f5fbfb8a2 100644
--- a/lily/ttf.cc
+++ b/lily/ttf.cc
@@ -153,6 +153,7 @@ print_trailer (void *out,
Index_to_charcode_map ic_map (make_index_to_charcode_map (face));
+ int output_count = 0;
for (int i = 0; i < mp->numGlyphs; i++)
{
glyph_name[0] = 0;
@@ -167,14 +168,19 @@ print_trailer (void *out,
}
}
- if (!glyph_name[0])
+ if (!glyph_name[0] && ic_map.find (i) != ic_map.end ())
{
- get_unicode_name (glyph_name, ic_map[i]);
+ FT_ULong ucode = ic_map[i];
+ get_unicode_name (glyph_name, ucode);
}
-
- lily_cookie_fprintf (out, "/%s %d def ", glyph_name, i);
- if (! (i % 5))
+ if (glyph_name[0])
+ {
+ lily_cookie_fprintf (out, "/%s %d def ", glyph_name, i);
+ output_count ++;
+ }
+
+ if (! (output_count % 5))
lily_cookie_fprintf (out, "\n");
}