X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fpango-font.hh;h=93ac7c11f896629899ef42667625071b3798abcc;hb=5b4b0d6e9a197e8f9eb085b7c2ad78b8be3e5cfc;hp=13038a6ee5b489a35da08cfddec0d79e26b8c940;hpb=42c8f04fe971525561dde0ee757ffebe3e6c0703;p=lilypond.git diff --git a/lily/include/pango-font.hh b/lily/include/pango-font.hh index 13038a6ee5..93ac7c11f8 100644 --- a/lily/include/pango-font.hh +++ b/lily/include/pango-font.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2004 Han-Wen Nienhuys + (c) 2004--2008 Han-Wen Nienhuys */ #ifndef PANGO_FONT_HH @@ -11,39 +11,40 @@ #include "config.hh" -#ifdef HAVE_PANGO16 +#if HAVE_PANGO_FT2 #include #include -#include "font-metric.hh" -#include "open-type-font.hh" +#include "font-metric.hh" class Pango_font : public Font_metric { - /** handle to face object */ - FT_Face face_; PangoContext *context_; + PangoFontDescription *pango_description_; PangoAttrList *attribute_list_; Real scale_; - SCM subfonts_; - Index_to_charcode_map index_to_charcode_map_; + Real output_scale_; + SCM physical_font_tab_; + Direction text_direction_; public: + 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) 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 SCM sub_fonts () const; + virtual Stencil word_stencil (string) const; + virtual Stencil text_stencil (string) const; virtual void derived_mark () const; - virtual int name_to_index (String) const; - virtual unsigned index_to_charcode (int) const; }; PangoFontDescription * @@ -51,13 +52,14 @@ symbols_to_pango_font_description (SCM family, SCM style, SCM variant, SCM weight, - SCM stretch, - Real size); + SCM stretch); Font_metric * select_pango_font (Output_def *layout, SCM chain); -#endif /* HAVE_PANGO16 */ +const int PANGO_RESOLUTION = 1200; +PangoFontDescription *properties_to_pango_description (SCM chain, Real text_size); +#endif /* HAVE_PANGO16 */ #endif /* PANGO_FONT_HH */