]> git.donarmstrong.com Git - lilypond.git/commitdiff
(print_trailer): only define glyph names when
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 6 Oct 2005 10:27:27 +0000 (10:27 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 6 Oct 2005 10:27:27 +0000 (10:27 +0000)
FT_Face has FT_FACE_FLAG_GLYPH_NAMES

ChangeLog
lily/open-type-font.cc
lily/ttf.cc
scm/define-grob-properties.scm

index f0198b71399b140533d2d01e3ed05b39a65055b0..faf12b528a277e2129541990d046bd720e6aaae4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/ttf.cc (print_trailer): only define glyph names when
+       FT_Face has FT_FACE_FLAG_GLYPH_NAMES
+
 2005-10-05  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/horizontal-bracket.cc (make_bracket): new function.
index a82a14f0e9067c87dd39a24757bee9e470512d68..e20a2c4ce5ff26c3f569b165a237d9eb93bd2b0a 100644 (file)
@@ -9,6 +9,7 @@
 #include "open-type-font.hh"
 
 #include <cstdio>
+
 using namespace std;
 
 #include <freetype/tttables.h>
index 170fbfb71967e3deb9cfaeeaec41a19a6c2a1027..5ac142ce55fbcd42821f1685e247e94eeadde2a7 100644 (file)
@@ -131,18 +131,22 @@ print_trailer (void *out,
     = (TT_MaxProfile *)FT_Get_Sfnt_Table (face, ft_sfnt_maxp);
 
   lily_cookie_fprintf (out, "/CharStrings %d dict dup begin\n", mp->numGlyphs);
-  for (int i = 0; i < mp->numGlyphs; i++)
-    {
-      FT_Error error = FT_Get_Glyph_Name (face, i, glyph_name, GLYPH_NAME_LEN);
 
-      if (error)
-       programming_error ("FT_Get_Glyph_Name() returned error");
-      else
-       lily_cookie_fprintf (out, "/%s %d def ", glyph_name, i);
 
-      if (! (i % 5))
-       lily_cookie_fprintf (out, "\n");
-    }
+  if (face->face_flags & FT_FACE_FLAG_GLYPH_NAMES)
+    for (int i = 0; i < mp->numGlyphs; i++)
+      {
+       FT_Error error = FT_Get_Glyph_Name (face, i, glyph_name,
+                                           GLYPH_NAME_LEN);
+       if (error)
+         programming_error ("print_trailer(): FT_Get_Glyph_Name() returned error");
+       else
+         lily_cookie_fprintf (out, "/%s %d def ", glyph_name, i);
+
+       if (! (i % 5))
+         lily_cookie_fprintf (out, "\n");
+      }
+
   lily_cookie_fprintf (out, "end readonly def\n");
   lily_cookie_fprintf (out, "FontName currentdict end definefont pop\n");
 }
index f71ee578c73721f7ec859a097ae308ea7cae2ac9..02d96c137b4fabf6fc7415f38208df2446271f50 100644 (file)
@@ -535,6 +535,7 @@ function is to protect objects from being garbage collected.")
      (direction-source ,ly:grob? "in case side-relative-direction is
 set, which grob to get the direction from .")
      (dot ,ly:grob? "reference to Dots object.")
+     (figures ,ly:grob-array? "Figured bass objects for continuation line.")
      (pedal-text ,ly:grob? "Pointer to the text of a mixed-style piano pedal.")
      (stem ,ly:grob? "pointer to Stem object.")
      (tremolo-flag ,ly:grob? "The tremolo object on a stem.")
@@ -546,14 +547,17 @@ set, which grob to get the direction from .")
      (accidental-grob ,ly:grob? "Accidental for this note.")
      (bars ,ly:grob-array? "list of bar line pointers.")
      (bounded-by-me ,ly:grob-array? "list of spanners that have this
-column as start/begin point. Only columns that have grobs or act as bounds are spaced.")
+column as start/begin point. Only columns that have grobs or act as
+bounds are spaced.")
      (columns ,ly:grob-array? "list of grobs, typically containing
 paper-columns or note-column objects.")
      (conditional-elements ,ly:grob-array? "Internal use only")
-     (dependencies ,ly:grob-array? "list of score-grob pointers that indicate who to compute first for certain global passes.")
+     (dependencies ,ly:grob-array? "list of score-grob pointers that indicate
+who to compute first for certain global passes.")
      (encompass-objects ,ly:grob-array? "Objects that a slur should avoid
 in addition to notes and stems.")
-     (elements ,ly:grob-array? "list of grobs, type depending on the Grob where this is set in.")
+     (elements ,ly:grob-array? "list of grobs, type depending on the Grob
+where this is set in.")
      (heads ,ly:grob-array? "List of note heads.")
      (items-worth-living ,ly:grob-array? "A list of interesting items. If
 empty in a particular staff, then that staff is erased.")