]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/open-type-font.hh
* stepmake/stepmake/generic-vars.make (LOOP): Add PLUS to keep -j
[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--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
8
9 #ifndef OPEN_TYPE_FONT_HH
10 #define OPEN_TYPE_FONT_HH
11
12 #include <map>
13 using namespace std;
14
15 #include "freetype.hh"
16 #include "font-metric.hh"
17
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
21 class Open_type_font : public Font_metric
22 {
23   /* handle to face object */
24   FT_Face face_;
25
26   SCM lily_subfonts_;
27   SCM lily_character_table_;
28   SCM lily_global_table_;
29   SCM lily_index_to_bbox_table_;
30
31   Index_to_charcode_map index_to_charcode_map_;
32   Open_type_font (FT_Face);
33
34   DECLARE_CLASSNAME(Open_type_font);
35 public:
36   SCM get_subfonts () const;
37   SCM get_global_table () const;
38   SCM get_char_table () const;
39   SCM glyph_list () const;
40     
41   std::string get_otf_table (std::string tag) const;
42   static SCM make_otf (std::string);
43   std::string font_name () const;
44   ~Open_type_font ();
45   Offset attachment_point (std::string) const;
46   vsize count () const;
47   Box get_indexed_char (vsize) const;
48   vsize name_to_index (std::string) const;
49   //vsize glyph_name_to_charcode (std::string) const;
50   vsize index_to_charcode (vsize) const;
51   void derived_mark () const;
52   SCM sub_fonts () const;
53   Real design_size () const;
54 };
55
56 std::string get_otf_table (FT_Face face, std::string tag);
57 FT_Face open_ft_face (std::string str);
58
59 #endif /* OPEN_TYPE_FONT_HH */