]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/all-font-metrics.hh
(all-grob-descriptions): remove all
[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--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef ALL_FONTS_HH
11 #define ALL_FONTS_HH
12
13 #include "file-path.hh"
14 #include "font-metric.hh"
15 #include "config.hh"
16
17 #ifdef HAVE_PANGO16
18 #include <pango/pango.h>
19 #include <pango/pangoft2.h>
20 #endif
21
22 /**
23    Interface to all .afm files living in the filesystem.
24  */
25 class All_font_metrics
26 {
27   Scheme_hash_table *afm_dict_;
28   Scheme_hash_table *tfm_dict_;
29   Scheme_hash_table *otf_dict_;
30   File_path search_path_;
31
32 #ifdef HAVE_PANGO_FT2
33   PangoFT2FontMap *pango_ft2_fontmap_;
34   Scheme_hash_table *pango_dict_;
35   int pango_dpi_;
36 #endif
37   
38   All_font_metrics (All_font_metrics const&);
39 public:
40   All_font_metrics (String search_path);
41   ~All_font_metrics ();
42   
43 #ifdef HAVE_PANGO_FT2
44   Pango_font *find_pango_font (PangoFontDescription*description,
45                                Real magnification,
46                                Real scale);
47 #endif
48   
49   Adobe_font_metric *find_afm (String name);
50   Tex_font_metric *find_tfm (String);
51   Font_metric *find_font (String name);  
52   Open_type_font *find_otf (String name);  
53   SCM font_descriptions () const;
54 };
55
56 extern All_font_metrics *all_fonts_global;
57
58 #endif /* ALL_FONTS_HH */
59