]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/pango-font.hh
Run `make grand-replace'.
[lilypond.git] / lily / include / pango-font.hh
index e6241c94938ec78fbe796dd7ba6033466d8e8ae6..93ac7c11f896629899ef42667625071b3798abcc 100644 (file)
@@ -1,11 +1,9 @@
-
 /*
   pango-font.hh -- declare Pango_font
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
+  (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #ifndef PANGO_FONT_HH
 
 #include "config.hh"
 
-#ifdef HAVE_PANGO16
+#if HAVE_PANGO_FT2
 
 #include <pango/pango.h>
 #include <pango/pangoft2.h>
+
 #include "font-metric.hh"
 
-struct Pango_font : Font_metric
+class Pango_font : public Font_metric
 {
   PangoContext *context_;
+  PangoFontDescription *pango_description_;
   PangoAttrList *attribute_list_;
   Real scale_;
-  SCM subfonts_;
+  Real output_scale_;
+  SCM physical_font_tab_;
+  Direction text_direction_;
+
 public:
-  virtual SCM sub_fonts () const;
-  SCM font_file_name () const;
-  virtual void derived_mark () const;
-  void register_font_file (String, String);
-  Stencil text_stencil (String) const;
+  SCM physical_font_tab () const;
   Pango_font (PangoFT2FontMap *,
-             int dpi, 
-             Direction leftright,
-             PangoFontDescription *);
+             PangoFontDescription const *,
+             Real);
   ~Pango_font ();
+
+  string description_string () const; 
+  SCM font_file_name () const;
+  void register_font_file (string, string);
+  Stencil text_stencil (string, bool tight) const;
+
+  Stencil pango_item_string_stencil (PangoItem const *, string, bool tight) const;
+
+  virtual Stencil word_stencil (string) const;
+  virtual Stencil text_stencil (string) const;
+  virtual void derived_mark () const;
 };
-PangoFontDescription* 
-symbols_to_pango_font_description(SCM family,
-                                 SCM style,
-                                 SCM variant,
-                                 SCM weight,
-                                 SCM stretch,
-                                 Real size);
+
+PangoFontDescription *
+symbols_to_pango_font_description (SCM family,
+                                  SCM style,
+                                  SCM variant,
+                                  SCM weight,
+                                  SCM stretch);
 
 Font_metric *
 select_pango_font (Output_def *layout, SCM chain);
 
-#endif
+const int PANGO_RESOLUTION = 1200;
+PangoFontDescription *properties_to_pango_description (SCM chain, Real text_size);
+
+#endif /* HAVE_PANGO16 */
 #endif /* PANGO_FONT_HH */