From: hanwen Date: Thu, 30 Mar 2006 10:48:35 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: release/2.8.2~9^2~149 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eccaaf9493050bb6197ff5142d166ccd4c8f29c3;p=lilypond.git *** empty log message *** --- diff --git a/ChangeLog b/ChangeLog index b5c080d99a..902268a42f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-03-30 Han-Wen Nienhuys + + * lily/ttf.cc (print_trailer): only print existing glyphs. + 2006-03-30 Joe Neeman * lily/stem-tremolo.cc (print): for whole notes (and breves, etc.) 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"); }