]> git.donarmstrong.com Git - lilypond.git/commitdiff
use glyph indexing for glyph name .notdef
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 1 Nov 2006 20:01:52 +0000 (21:01 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 1 Nov 2006 20:01:52 +0000 (21:01 +0100)
lily/pango-font.cc
lily/ttf.cc

index 7d50025c388197c9629e84a48fa55d3ecaea791c..e075029154b68ed7cb7638f8ddced5106957a11b 100644 (file)
@@ -178,12 +178,10 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
          if (errorcode)
            programming_error ("FT_Get_Glyph_Name returns error");
        }
-      
+
       SCM char_id = SCM_EOL;
       if (glyph_name[0] == '\0'
          && cmap
-
-         /* Ugh should ask FreeType about font type. */
          && is_ttf
          && cmap->find (pg) != cmap->end ())
        {
@@ -200,6 +198,10 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
          continue;
        }
 
+      
+      if (glyph_name == string (".notdef") && is_ttf)
+       glyph_name[0] = '\0';
+         
       if (glyph_name[0] == '\0' && is_ttf)
        {
          // access by glyph index directly.
index 3c6370fd25317b488a48dd28e1075ab79a03dc21..0e5526f8e1727a7b5d3bbc79f2f562652fe2fe86 100644 (file)
@@ -180,6 +180,10 @@ print_trailer (void *out,
          get_unicode_name (glyph_name, ucode);
        }
 
+      if (glyph_name == string (".notdef"))
+       glyph_name[0] = '\0';
+
+      
       if (!glyph_name[0])
        {
          get_glyph_index_name (glyph_name, i);