X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fpango-font.hh;h=2a3367705b8ee2c4f51008d16b7752e99ac61d56;hb=b0dce4ca74c6ebf43a3f574ccf281b8bc58a3b75;hp=dc93324da84c084e4991fd42f70774e1d00fa0b5;hpb=89b76c367754570218e76a116127225f89f41212;p=lilypond.git diff --git a/lily/include/pango-font.hh b/lily/include/pango-font.hh index dc93324da8..2a3367705b 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--2015 Han-Wen Nienhuys - (c) 2004--2008 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 @@ -18,7 +29,7 @@ #include "font-metric.hh" -class Pango_font : public Font_metric +class Pango_font : public Preinit, public Font_metric { PangoContext *context_; PangoFontDescription *pango_description_; @@ -30,29 +41,35 @@ class Pango_font : public Font_metric public: SCM physical_font_tab () const; + void pre_init (); Pango_font (PangoFT2FontMap *, - PangoFontDescription const *, - Real); + PangoFontDescription const *, + Real); ~Pango_font (); - string description_string () const; + string description_string () const; SCM font_file_name () const; - void register_font_file (string, string, int); - Stencil text_stencil (string, bool tight) const; + 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 (PangoItem const *, string, bool tight) const; + Stencil pango_item_string_stencil (PangoGlyphItem const *) const; - virtual Stencil word_stencil (string) const; - virtual Stencil text_stencil (string) const; + virtual Stencil text_stencil (Output_def *output_state, + const 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); + SCM style, + SCM variant, + SCM weight, + SCM stretch); Font_metric * select_pango_font (Output_def *layout, SCM chain);