]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/pango-font.hh
(LY_DEFINE): use scm_c_make_hash_table().
[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 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 #ifdef 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   PangoAttrList *attribute_list_;
26   Real scale_;
27   SCM subfonts_;
28 public:
29   Pango_font (PangoFT2FontMap *,
30               Direction leftright,
31               PangoFontDescription *);
32   ~Pango_font ();
33
34   SCM font_file_name () const;
35   void register_font_file (String, String);
36   Stencil text_stencil (String) const;
37   Stencil pango_item_string_stencil (PangoItem*, String, Real) const;
38
39   virtual SCM sub_fonts () const;
40   virtual void derived_mark () const;
41 };
42
43 PangoFontDescription *
44 symbols_to_pango_font_description (SCM family,
45                                    SCM style,
46                                    SCM variant,
47                                    SCM weight,
48                                    SCM stretch,
49                                    Real size);
50
51 Font_metric *
52 select_pango_font (Output_def *layout, SCM chain);
53
54 const int PANGO_DPI = 1200;
55
56 #endif /* HAVE_PANGO16 */
57 #endif /* PANGO_FONT_HH */
58