]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/open-type-font.hh
* buildscripts/gen-bigcheese-scripts.py (i): load .subfonts table.
[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 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #ifndef OPEN_TYPE_FONT_HH
11 #define OPEN_TYPE_FONT_HH
12
13 #include <map>
14 #include "freetype.hh"
15 #include "font-metric.hh"
16
17 typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
18 //typedef std::map<String, FT_ULong> Glyph_name_to_charcode_map;
19
20 class Open_type_font : public Font_metric
21 {
22   FT_Face face_; /* handle to face object */
23
24   SCM lily_subfonts_; 
25   SCM lily_character_table_; 
26   SCM lily_global_table_;
27   Index_to_charcode_map index_to_charcode_map_;
28   //Glyph_name_to_charcode_map glyph_name_to_charcode_map_;
29   Open_type_font (FT_Face);
30
31 public:
32   static SCM make_otf (String);
33   virtual ~Open_type_font();
34   virtual Offset attachment_point (String) const;
35   virtual Box get_indexed_char (int) const;
36   virtual int name_to_index (String) const;
37   //virtual unsigned glyph_name_to_charcode (String) const;
38   virtual unsigned index_to_charcode (int) const;
39   virtual void derived_mark () const;
40   virtual SCM sub_fonts () const;
41 #if 0
42   virtual int count () const;
43   virtual int index_to_ascii (int) const;
44   virtual Box get_ascii_char (int) const;
45   virtual Offset get_indexed_wxwy (int) const;
46 #endif
47   virtual Real design_size () const;
48 };
49
50 #endif /* OPEN_TYPE_FONT_HH */