]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/pango-font.hh
(text_stencil): don't translate glyphs in
[lilypond.git] / lily / include / pango-font.hh
1 /*
2   pango-font.hh -- declare Pango_font
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef PANGO_FONT_HH
10 #define PANGO_FONT_HH
11
12 #include "config.hh"
13
14 #if HAVE_PANGO16
15
16 #include <pango/pango.h>
17 #include <pango/pangoft2.h>
18 #include "font-metric.hh"
19
20 #include "open-type-font.hh"
21
22 class Pango_font : public Font_metric
23 {
24   PangoContext *context_;
25   PangoFontDescription *pango_description_;
26   PangoAttrList *attribute_list_;
27   Real scale_;
28   Real output_scale_;
29   SCM physical_font_tab_;
30
31 public:
32   SCM physical_font_tab () const;
33   Pango_font (PangoFT2FontMap *,
34               Direction leftright,
35               PangoFontDescription *,
36               Real);
37   ~Pango_font ();
38
39   SCM font_file_name () const;
40   void register_font_file (String, String);
41   Stencil text_stencil (String) const;
42   Stencil pango_item_string_stencil (PangoItem *, String) const;
43
44   virtual void derived_mark () const;
45 };
46
47 PangoFontDescription *
48 symbols_to_pango_font_description (SCM family,
49                                    SCM style,
50                                    SCM variant,
51                                    SCM weight,
52                                    SCM stretch);
53
54 Font_metric *
55 select_pango_font (Output_def *layout, SCM chain);
56
57 const int PANGO_RESOLUTION = 1200;
58 PangoFontDescription *properties_to_pango_description (SCM chain, Real text_size);
59
60 #endif /* HAVE_PANGO16 */
61 #endif /* PANGO_FONT_HH */
62