]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pango-font.cc
Include `freetype.hh' where appropriate.
[lilypond.git] / lily / pango-font.cc
index a1d3024abbd6c3e6628d505bf7f2344217dcf0c2..e7b5489df53b7d7963ef519271ded85da2e50d8f 100644 (file)
@@ -22,7 +22,8 @@
 #define PANGO_ENABLE_BACKEND
 
 #include <pango/pangoft2.h>
-#include <freetype/ftxf86.h>
+#include "freetype.hh"
+#include FT_XFREE86_H
 
 #include <map>
 #include <cstdio>
@@ -81,8 +82,8 @@ Pango_font::~Pango_font ()
 }
 
 void
-Pango_font::register_font_file (string filename,
-                                string ps_name,
+Pango_font::register_font_file (const string &filename,
+                                const string &ps_name,
                                 int face_index)
 {
   scm_hash_set_x (physical_font_tab_,
@@ -240,6 +241,13 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const
       if (!(pg ^ PANGO_GLYPH_EMPTY))
         continue;
 
+      if (pg & PANGO_GLYPH_UNKNOWN_FLAG)
+        {
+          warning (_f ("no glyph for character U+%0X in font `%s'",
+                       pg & ~PANGO_GLYPH_UNKNOWN_FLAG, file_name.c_str ()));
+          continue;
+        }
+
       glyph_name[0] = '\0';
       if (has_glyph_names)
         {
@@ -376,7 +384,7 @@ extern bool music_strings_to_paths;
 
 Stencil
 Pango_font::text_stencil (Output_def * /* state */,
-                          string str, bool music_string) const
+                          const string &str, bool music_string) const
 {
   /*
     The text assigned to a PangoLayout is automatically divided