]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/all-font-metrics.cc
Merge commit 'origin/dev/jneeman' into systems-per-page
[lilypond.git] / lily / all-font-metrics.cc
index 3792b353db05c0c67189afd0fc822a2f3a2a4814..9721f8e8093af98b239f1e99c148c03fd7081950 100644 (file)
@@ -3,11 +3,12 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2007 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];
 }