2 open-type-font.hh -- declare Open_type_font
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #ifndef OPEN_TYPE_FONT_HH
10 #define OPEN_TYPE_FONT_HH
13 #include "freetype.hh"
14 #include "font-metric.hh"
16 typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
17 Index_to_charcode_map make_index_to_charcode_map (FT_Face face);
19 class Open_type_font : public Font_metric
21 /* handle to face object */
25 SCM lily_character_table_;
26 SCM lily_global_table_;
27 SCM lily_index_to_bbox_table_;
29 Index_to_charcode_map index_to_charcode_map_;
30 Open_type_font (FT_Face);
33 SCM get_subfonts () const;
34 SCM get_global_table () const;
35 SCM get_char_table () const;
37 String get_otf_table (String tag) const;
38 static SCM make_otf (String);
39 virtual String font_name () const;
40 virtual ~Open_type_font ();
41 virtual Offset attachment_point (String) const;
42 virtual int count () const;
43 virtual Box get_indexed_char (int) const;
44 virtual int name_to_index (String) const;
45 //virtual unsigned glyph_name_to_charcode (String) const;
46 virtual unsigned index_to_charcode (int) const;
47 virtual void derived_mark () const;
48 virtual SCM sub_fonts () const;
49 virtual Real design_size () const;
52 String get_otf_table (FT_Face face, String tag);
53 FT_Face open_ft_face (String str);
55 #endif /* OPEN_TYPE_FONT_HH */