Fixes Issue 1504, allowing feather beam line breaking.
[lilypond/patrick.git] / lily / pango-font-scheme.cc
blobf2ae0219129ac221780dd662f33525f4a6ca664d
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2004--2011 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/>.
20 #define PANGO_ENABLE_BACKEND // ugh, why necessary?
22 #include <pango/pangoft2.h>
24 #include "main.hh"
25 #include "lookup.hh"
26 #include "dimensions.hh"
27 #include "pango-font.hh"
28 #include "warn.hh"
30 #if HAVE_PANGO_FT2
31 #include "stencil.hh"
33 LY_DEFINE (ly_pango_font_p, "ly:pango-font?",
34 1, 0, 0,
35 (SCM f),
36 "Is @var{f} a pango font?")
38 return scm_from_bool (dynamic_cast<Pango_font *> (unsmob_metrics (f)));
41 LY_DEFINE (ly_pango_font_physical_fonts, "ly:pango-font-physical-fonts",
42 1, 0, 0,
43 (SCM f),
44 "Return alist of @code{(ps-name file-name font-index)} lists"
45 " for Pango font@tie{}@var{f}.")
47 Pango_font *pf = dynamic_cast<Pango_font *> (unsmob_metrics (f));
49 SCM alist = SCM_EOL;
50 if (pf)
51 alist = ly_hash2alist (pf->physical_font_tab ());
53 return alist;
55 #endif