2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 1998--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
23 #include "file-path.hh"
24 #include "font-metric.hh"
28 #include <pango/pango.h>
29 #include <pango/pangoft2.h>
33 Interface to all fonts (both system fonts and fonts loaded
36 class All_font_metrics : public Smob<All_font_metrics>
38 Scheme_hash_table *otf_dict_;
39 File_path search_path_;
42 PangoFT2FontMap *pango_ft2_fontmap_;
43 Scheme_hash_table *pango_dict_;
47 map<string, Index_to_charcode_map > filename_charcode_maps_map_;
49 All_font_metrics (All_font_metrics const &);
51 SCM mark_smob () const;
53 Index_to_charcode_map const *get_index_to_charcode_map (const string &filename,
57 All_font_metrics (const string &search_path);
60 Pango_font *find_pango_font (PangoFontDescription const *description,
63 Font_metric *find_font (const string &name);
64 Open_type_font *find_otf (const string &name);
65 SCM font_descriptions () const;
68 extern All_font_metrics *all_fonts_global;
69 SCM ly_reset_all_fonts ();
71 #endif /* ALL_FONTS_HH */