]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/pango-font.hh
* lily/pango-font.cc (text_stencil): Quick try at glyph->charcode
[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   /** handle to face object */
25   FT_Face face_;
26   PangoContext *context_;
27   PangoAttrList *attribute_list_;
28   Real scale_;
29   SCM subfonts_;
30   Index_to_charcode_map index_to_charcode_map_;
31
32 public:
33   Pango_font (PangoFT2FontMap *,
34               int dpi, 
35               Direction leftright,
36               PangoFontDescription *);
37   ~Pango_font ();
38
39   SCM font_file_name () const;
40   void register_font_file (String, String);
41   Stencil text_stencil (String) const;
42
43   virtual SCM sub_fonts () const;
44   virtual void derived_mark () const;
45   virtual int name_to_index (String) const;
46   virtual unsigned index_to_charcode (int) const;
47 };
48
49 PangoFontDescription *
50 symbols_to_pango_font_description (SCM family,
51                                    SCM style,
52                                    SCM variant,
53                                    SCM weight,
54                                    SCM stretch,
55                                    Real size);
56
57 Font_metric *
58 select_pango_font (Output_def *layout, SCM chain);
59
60 #endif /* HAVE_PANGO16 */
61
62 #endif /* PANGO_FONT_HH */
63