/*
- all-font-metrics.cc -- implement All_font_metrics
+ This file is part of LilyPond, the GNU music typesetter.
- source file of the GNU LilyPond music typesetter
+ Copyright (C) 1999--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
- (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
*/
#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];
}
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,
return 0;
if (be_verbose_global)
- progress_indication ("[" + file_name);
+ progress_indication ("\n[" + file_name);
val = Open_type_font::make_otf (file_name);