]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pango-font.cc
(pango_item_string_stencil): use
[lilypond.git] / lily / pango-font.cc
index 5592c76ba68560f921bc2542d72ff45f8cca0de0..322b50c7774c9cb637ab97e6413fa37f4d23dc0e 100644 (file)
@@ -8,6 +8,7 @@
 
 #define PANGO_ENABLE_BACKEND // ugh, why necessary?
 #include <pango/pangoft2.h>
+#include <freetype/ftxf86.h>
 
 /* Ugh.  */
 #include "pango-font.hh"
@@ -160,9 +161,8 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str,
   bool has_glyph_names = ftface->face_flags & FT_FACE_FLAG_GLYPH_NAMES;
   if  (! has_glyph_names)
     cmap = get_index_to_charcode_map (file_name, ftface);
-  bool is_ttf = (file_name.find (".ttf") != NPOS
-                || file_name.find (".TTF") != NPOS);
-  
+
+  bool is_ttf = string (FT_Get_X11_Font_Format (ftface)) == "TrueType6";
   bool cid_keyed = false;
   for (int i = 0; i < pgs->num_glyphs; i++)
     {