]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/all-font-metrics.hh
* stepmake/aclocal.m4 (STEPMAKE_PANGO_FT2): Define HAVE_PANGO16 too.
[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--2005 Han-Wen Nienhuys <hanwen@cs.uu.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_PANGO16
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 *afm_dict_;
27   Scheme_hash_table *tfm_dict_;
28   Scheme_hash_table *otf_dict_;
29   File_path search_path_;
30
31 #if HAVE_PANGO_FT2
32   PangoFT2FontMap *pango_ft2_fontmap_;
33   Scheme_hash_table *pango_dict_;
34   int pango_dpi_;
35 #endif
36
37   All_font_metrics (All_font_metrics const &);
38 public:
39   All_font_metrics (String search_path);
40   ~All_font_metrics ();
41
42 #if HAVE_PANGO_FT2
43   Pango_font *find_pango_font (PangoFontDescription *description,
44                                Real magnification,
45                                Real scale);
46 #endif
47
48   Adobe_font_metric *find_afm (String name);
49   Tex_font_metric *find_tfm (String);
50   Font_metric *find_font (String name);
51   Open_type_font *find_otf (String name);
52   SCM font_descriptions () const;
53 };
54
55 extern All_font_metrics *all_fonts_global;
56
57 #endif /* ALL_FONTS_HH */
58