2 open-type-font.hh -- declare Open_type_font
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #ifndef OPEN_TYPE_FONT_HH
10 #define OPEN_TYPE_FONT_HH
15 #include "freetype.hh"
16 #include "font-metric.hh"
18 typedef map<FT_UInt, FT_ULong> Index_to_charcode_map;
19 Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
20 void get_unicode_name (char*s, FT_ULong code);
21 void get_glyph_index_name (char*s, FT_ULong code);
23 class Open_type_font : public Font_metric
25 /* handle to face object */
29 SCM lily_character_table_;
30 SCM lily_global_table_;
31 SCM lily_index_to_bbox_table_;
33 Index_to_charcode_map index_to_charcode_map_;
34 Open_type_font (FT_Face);
36 DECLARE_CLASSNAME(Open_type_font);
38 SCM get_subfonts () const;
39 SCM get_global_table () const;
40 SCM get_char_table () const;
41 SCM glyph_list () const;
43 string get_otf_table (string tag) const;
44 static SCM make_otf (string);
45 string font_name () const;
47 Offset attachment_point (string) const;
48 size_t count () const;
49 Box get_indexed_char (size_t) const;
50 size_t name_to_index (string) const;
51 //size_t glyph_name_to_charcode (string) const;
52 size_t index_to_charcode (size_t) const;
53 void derived_mark () const;
54 SCM sub_fonts () const;
55 Real design_size () const;
58 string get_otf_table (FT_Face face, string tag);
59 FT_Face open_ft_face (string str);
61 #endif /* OPEN_TYPE_FONT_HH */