]> git.donarmstrong.com Git - lilypond.git/blob - lily/pango-font-scheme.cc
new file.
[lilypond.git] / lily / pango-font-scheme.cc
1 /*
2   pango-font-scheme.cc -- implement Pango_font
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10
11 #define PANGO_ENABLE_BACKEND // ugh, why necessary?
12
13 #include <pango/pangoft2.h>
14
15 #include "main.hh"
16 #include "lookup.hh"
17 #include "dimensions.hh"
18 #include "pango-font.hh"
19 #include "warn.hh"
20
21 #if HAVE_PANGO_FT2
22 #include "stencil.hh" 
23
24
25 LY_DEFINE (ly_pango_font_p, "ly:pango-font?",
26            1, 0, 0,
27            (SCM f),
28            "Is @var{f} a pango font?")
29 {
30   return scm_from_bool (dynamic_cast<Pango_font*> (unsmob_metrics (f)));
31 }
32
33
34
35 LY_DEFINE (ly_pango_font_physical_fonts, "ly:pango-font-physical-fonts",
36            1, 0, 0,
37            (SCM f),
38            "Return alist of  (PSNAME . FILENAME) tuples.")
39 {
40   Pango_font *pf = dynamic_cast<Pango_font*> (unsmob_metrics (f));
41
42   SCM alist = SCM_EOL;
43   if (pf)
44     alist = ly_hash2alist (pf->physical_font_tab ());
45
46   return alist;
47 }
48 #endif