]> git.donarmstrong.com Git - lilypond.git/blob - lily/pango-font-scheme.cc
Web-ja: update introduction
[lilypond.git] / lily / pango-font-scheme.cc
1 /*
2   This file is part of LilyPond, the GNU music typesetter.
3
4   Copyright (C) 2004--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
5
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.
10
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.
15
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/>.
18 */
19
20 #define PANGO_ENABLE_BACKEND // ugh, why necessary?
21
22 #include <pango/pangoft2.h>
23
24 #include "main.hh"
25 #include "lookup.hh"
26 #include "dimensions.hh"
27 #include "pango-font.hh"
28 #include "warn.hh"
29
30 #if HAVE_PANGO_FT2
31 #include "stencil.hh"
32
33 LY_DEFINE (ly_pango_font_p, "ly:pango-font?",
34            1, 0, 0,
35            (SCM f),
36            "Is @var{f} a pango font?")
37 {
38   return scm_from_bool (unsmob<Pango_font> (f));
39 }
40
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}.")
46 {
47   Pango_font *pf = unsmob<Pango_font> (f);
48
49   SCM alist = SCM_EOL;
50   if (pf)
51     alist = ly_hash2alist (pf->physical_font_tab ());
52
53   return alist;
54 }
55 #endif