]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
* Use /dev/stderr instead of /dev/tty (Closes: #574629)
[lilypond.git] / lily / all-font-metrics.cc
index 2deea75cdae8d0bad956c7609b7392c3458c5f27..344d3a3e7548023c9b7a16b52f187f9fc61674d6 100644 (file)
@@ -3,11 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1999--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "all-font-metrics.hh"
 
+#include "string-convert.hh"
 #include "international.hh"
 #include "main.hh"
 #include "open-type-font.hh"
 
 
 Index_to_charcode_map const *
-All_font_metrics::get_index_to_charcode_map (string filename, FT_Face face)
+All_font_metrics::get_index_to_charcode_map (string filename,
+                                            int face_index,
+                                            FT_Face face)
 {
-  if (filename_charcode_maps_map_.find (filename)
+  string key = filename + String_convert::int_string (face_index);
+  if (filename_charcode_maps_map_.find (key)
       == filename_charcode_maps_map_.end ())
-    filename_charcode_maps_map_[filename] = make_index_to_charcode_map (face);
+    filename_charcode_maps_map_[key] = make_index_to_charcode_map (face);
 
-  return &filename_charcode_maps_map_[filename];
+  return &filename_charcode_maps_map_[key];
 }
 
 
@@ -76,7 +80,7 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description,
   if (!pango_dict_->try_retrieve (key, &val))
     {
       if (be_verbose_global)
-       progress_indication ("[" + string (pango_fn));
+       progress_indication ("\n[" + string (pango_fn));
 
       Pango_font *pf = new Pango_font (pango_ft2_fontmap_,
                                       description,
@@ -115,7 +119,7 @@ All_font_metrics::find_otf (string name)
        return 0;
 
       if (be_verbose_global)
-       progress_indication ("[" + file_name);
+       progress_indication ("\n[" + file_name);
 
       val = Open_type_font::make_otf (file_name);