X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fpango-font.hh;h=b92eb60c429d8af7da3403a671a645f1d75546a0;hb=dc71d81b8b6846a01985d3c9eec422607bd076c8;hp=36aa04c391a95a1127b29970e355c680d6945726;hpb=254f634d6e541adeea359a557ea9c9ad8860131c;p=lilypond.git diff --git a/lily/include/pango-font.hh b/lily/include/pango-font.hh index 36aa04c391..b92eb60c42 100644 --- a/lily/include/pango-font.hh +++ b/lily/include/pango-font.hh @@ -1,9 +1,20 @@ /* - pango-font.hh -- declare Pango_font + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2004--2011 Han-Wen Nienhuys - (c) 2004 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #ifndef PANGO_FONT_HH @@ -11,46 +22,53 @@ #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 { PangoContext *context_; + PangoFontDescription *pango_description_; PangoAttrList *attribute_list_; Real scale_; - SCM subfonts_; + Real output_scale_; + SCM physical_font_tab_; + Direction text_direction_; + public: + SCM physical_font_tab () const; Pango_font (PangoFT2FontMap *, - 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, int); + + Stencil pango_item_string_stencil (PangoGlyphItem const *) const; - virtual SCM sub_fonts () const; + virtual Stencil text_stencil (Output_def *output_state, + string text, bool music) const; virtual void derived_mark () const; }; PangoFontDescription * symbols_to_pango_font_description (SCM family, - SCM style, - SCM variant, - SCM weight, - SCM stretch, - Real size); + SCM style, + SCM variant, + SCM weight, + SCM stretch); Font_metric * select_pango_font (Output_def *layout, SCM chain); -const int PANGO_DPI = 1200; +const int PANGO_RESOLUTION = 1200; +PangoFontDescription *properties_to_pango_description (SCM chain, Real text_size); #endif /* HAVE_PANGO16 */ #endif /* PANGO_FONT_HH */