2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2004--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
27 #include <pango/pango.h>
28 #include <pango/pangoft2.h>
30 #include "font-metric.hh"
32 class Pango_font : public Font_metric
34 PangoContext *context_;
35 PangoFontDescription *pango_description_;
36 PangoAttrList *attribute_list_;
39 SCM physical_font_tab_;
40 Direction text_direction_;
43 SCM physical_font_tab () const;
44 Pango_font (PangoFT2FontMap *,
45 PangoFontDescription const *,
49 string description_string () const;
50 SCM font_file_name () const;
51 void register_font_file (string, string, int);
52 Stencil text_stencil (string, bool, bool) const;
54 Stencil pango_item_string_stencil (PangoGlyphItem const *, bool) const;
56 virtual Stencil word_stencil (string, bool) const;
57 virtual Stencil text_stencil (string, bool) const;
58 virtual void derived_mark () const;
61 PangoFontDescription *
62 symbols_to_pango_font_description (SCM family,
69 select_pango_font (Output_def *layout, SCM chain);
71 const int PANGO_RESOLUTION = 1200;
72 PangoFontDescription *properties_to_pango_description (SCM chain, Real text_size);
74 #endif /* HAVE_PANGO16 */
75 #endif /* PANGO_FONT_HH */