]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/all-font-metrics.hh
c8c0de2f0a78f748bb61d70b9423c8666e1541c1
[lilypond.git] / lily / include / all-font-metrics.hh
1 /*
2   all-fonts.hh -- declare All_font_metrics
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef ALL_FONTS_HH
10 #define ALL_FONTS_HH
11
12 #include "file-path.hh"
13 #include "font-metric.hh"
14 #include "config.hh"
15
16 #if HAVE_PANGO_FT2
17 #include <pango/pango.h>
18 #include <pango/pangoft2.h>
19 #endif
20
21 /**
22    Interface to all .afm files living in the filesystem.
23 */
24 class All_font_metrics
25 {
26   Scheme_hash_table *otf_dict_;
27   File_path search_path_;
28
29 #if HAVE_PANGO_FT2
30   PangoFT2FontMap *pango_ft2_fontmap_;
31   Scheme_hash_table *pango_dict_;
32   int pango_dpi_;
33 #endif
34
35   All_font_metrics (All_font_metrics const &);
36 public:
37   All_font_metrics (string search_path);
38   ~All_font_metrics ();
39
40 #if HAVE_PANGO_FT2
41   Pango_font *find_pango_font (PangoFontDescription *description,
42                                Real magnification,
43                                Real scale);
44 #endif
45
46   Font_metric *find_font (string name);
47   Open_type_font *find_otf (string name);
48   SCM font_descriptions () const;
49 };
50
51 extern All_font_metrics *all_fonts_global;
52
53 #endif /* ALL_FONTS_HH */
54