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