]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/open-type-font.hh
1ca5500446bf9e4f70bba567c3c29192340abf51
[lilypond.git] / lily / include / open-type-font.hh
1 /*
2   open-type-font.hh -- declare Open_type_font
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef OPEN_TYPE_FONT_HH
10 #define OPEN_TYPE_FONT_HH
11
12
13 #include "font-metric.hh"
14
15 Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
16 void get_unicode_name (char*s, FT_ULong code);
17 void get_glyph_index_name (char*s, FT_ULong code);
18
19 class Open_type_font : public Font_metric
20 {
21   /* handle to face object */
22   FT_Face face_;
23
24   SCM lily_subfonts_;
25   SCM lily_character_table_;
26   SCM lily_global_table_;
27   SCM lily_index_to_bbox_table_;
28
29   Index_to_charcode_map index_to_charcode_map_;
30   Open_type_font (FT_Face);
31
32   DECLARE_CLASSNAME(Open_type_font);
33 public:
34   SCM get_subfonts () const;
35   SCM get_global_table () const;
36   SCM get_char_table () const;
37   SCM glyph_list () const;
38     
39   string get_otf_table (string tag) const;
40   static SCM make_otf (string);
41   string font_name () const;
42   ~Open_type_font ();
43   Offset attachment_point (string) const;
44   size_t count () const;
45   Box get_indexed_char (size_t) const;
46   size_t name_to_index (string) const;
47   //size_t glyph_name_to_charcode (string) const;
48   size_t index_to_charcode (size_t) const;
49   void derived_mark () const;
50   SCM sub_fonts () const;
51   Real design_size () const;
52 };
53
54 string get_otf_table (FT_Face face, string tag);
55 FT_Face open_ft_face (string str);
56
57
58 #endif /* OPEN_TYPE_FONT_HH */