X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fopen-type-font.hh;h=475cc4c169e40a4b79234fec3858303d1bd0aa5d;hb=38d7d319eabc906e82fb42002678c6d42a23b6f7;hp=e1260eafc765657f888e0a1d60c8b1d4e82272bc;hpb=65c9f2edb8ae873e593687ad75e546820ed7647c;p=lilypond.git diff --git a/lily/include/open-type-font.hh b/lily/include/open-type-font.hh index e1260eafc7..475cc4c169 100644 --- a/lily/include/open-type-font.hh +++ b/lily/include/open-type-font.hh @@ -3,43 +3,56 @@ source file of the GNU LilyPond music typesetter - (c) 2004 Han-Wen Nienhuys - + (c) 2004--2009 Han-Wen Nienhuys */ #ifndef OPEN_TYPE_FONT_HH #define OPEN_TYPE_FONT_HH -#include -#include "freetype.hh" + #include "font-metric.hh" -typedef std::map Index_to_charcode_map; +Index_to_charcode_map make_index_to_charcode_map (FT_Face face); +void get_unicode_name (char*s, FT_ULong code); +void get_glyph_index_name (char*s, FT_ULong code); class Open_type_font : public Font_metric { - FT_Face face_; /* handle to face object */ + /* handle to face object */ + FT_Face face_; - SCM lily_character_table_; + SCM lily_subfonts_; + SCM lily_character_table_; SCM lily_global_table_; + SCM lily_index_to_bbox_table_; + Index_to_charcode_map index_to_charcode_map_; Open_type_font (FT_Face); + + DECLARE_CLASSNAME(Open_type_font); public: - static SCM make_otf (String); - virtual ~Open_type_font(); - virtual Offset attachment_point (String) const; - virtual Box get_indexed_char (int) const; - virtual int name_to_index (String) const; - virtual void derived_mark () const; -#if 0 - virtual int count () const; - virtual int index_to_ascii (int) const; - virtual Box get_ascii_char (int) const; - virtual Offset get_indexed_wxwy (int) const; -#endif - virtual Real design_size () const; + SCM get_subfonts () const; + SCM get_global_table () const; + SCM get_char_table () const; + SCM glyph_list () const; + + string get_otf_table (string tag) const; + static SCM make_otf (string); + string font_name () const; + ~Open_type_font (); + Offset attachment_point (string) const; + size_t count () const; + Box get_indexed_char (size_t) const; + size_t name_to_index (string) const; + //size_t glyph_name_to_charcode (string) const; + size_t index_to_charcode (size_t) const; + void derived_mark () const; + SCM sub_fonts () const; + Real design_size () const; }; +string get_otf_table (FT_Face face, string tag); +FT_Face open_ft_face (string str, FT_Long idx); -#endif /* OPEN_TYPE_FONT_HH */ +#endif /* OPEN_TYPE_FONT_HH */