]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/pango-font.hh
Issue 1388: Initial work to support opentype font features.
[lilypond.git] / lily / include / pango-font.hh
index 6b4ad4b68f9646196d774216b0d27330d2892e0f..5e804f7a8f8f743430dd0c757d3220bd9df5619b 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2004--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
 
 #include "font-metric.hh"
 
-class Pango_font : public Font_metric
+struct Preinit_Pango_font {
+  SCM physical_font_tab_;
+  Preinit_Pango_font ();
+};
+
+class Pango_font : Preinit_Pango_font, public Font_metric
 {
   PangoContext *context_;
   PangoFontDescription *pango_description_;
   PangoAttrList *attribute_list_;
   Real scale_;
   Real output_scale_;
-  SCM physical_font_tab_;
   Direction text_direction_;
 
 public:
@@ -48,12 +52,20 @@ public:
 
   string description_string () const;
   SCM font_file_name () const;
-  void register_font_file (string, string, int);
+  void register_font_file (const string &filename, const string &ps_name, int face_index);
+
+  size_t name_to_index (string) const;
+  SCM get_glyph_outline (size_t signed_idx) const;
+  Box get_glyph_outline_bbox (size_t signed_idx) const;
+  Box get_unscaled_indexed_char_dimensions (size_t) const;
+  Box get_scaled_indexed_char_dimensions (size_t) const;
 
   Stencil pango_item_string_stencil (PangoGlyphItem const *) const;
 
   virtual Stencil text_stencil (Output_def *output_state,
-                                string text, bool music) const;
+                                const string &text,
+                                bool music,
+                                const string &features_str) const;
   virtual void derived_mark () const;
 };