]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/open-type-font.hh
Issue 5167/1: Reorganize markup commands to use object properties
[lilypond.git] / lily / include / open-type-font.hh
index 49b257586c9e05c0bf780fa2cdabcbb677b8ce4f..76d015325591ab602900aa356146fb0cf4d8431c 100644 (file)
@@ -26,15 +26,19 @@ 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
-{
-  /* handle to face object */
-  FT_Face face_;
-
+struct Preinit_Open_type_font {
   SCM lily_subfonts_;
   SCM lily_character_table_;
   SCM lily_global_table_;
   SCM lily_index_to_bbox_table_;
+  Preinit_Open_type_font ();
+};
+
+class Open_type_font : Preinit_Open_type_font, public Font_metric
+{
+  /* handle to face object */
+  FT_Face face_;
+  string postscript_name_;
 
   Index_to_charcode_map index_to_charcode_map_;
   Open_type_font (FT_Face);
@@ -48,22 +52,23 @@ public:
   SCM glyph_list () const;
   SCM get_glyph_outline (size_t signed_idx) const;
   Box get_glyph_outline_bbox (size_t signed_idx) const;
-  std::string get_otf_table (const std::string &tag) const;
-  static SCM make_otf (const std::string&);
-  std::string font_name () const;
+  string get_otf_table (const string &tag) const;
+  static SCM make_otf (const string&);
+  string font_name () const;
   ~Open_type_font ();
-  Offset attachment_point (const std::string&) const;
+  Offset attachment_point (const string&) const;
   size_t count () const;
   Box get_indexed_char_dimensions (size_t) const;
   Box get_unscaled_indexed_char_dimensions (size_t) const;
-  size_t name_to_index (std::string) const;
+  size_t name_to_index (string) const;
   size_t index_to_charcode (size_t) const;
   void derived_mark () const;
   SCM sub_fonts () const;
   Real design_size () const;
 };
 
-std::string get_otf_table (FT_Face face, const std::string &tag);
-FT_Face open_ft_face (const std::string&, FT_Long idx);
+string get_otf_table (FT_Face face, const string &tag);
+FT_Face open_ft_face (const string&, FT_Long idx);
+string get_postscript_name (FT_Face face);
 
 #endif /* OPEN_TYPE_FONT_HH */