2 font-config-scheme.cc -- implement FontConfig bindings.
4 source file of the GNU LilyPond music typesetter
6 (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
10 #include "lily-guile.hh"
12 #include <fontconfig/fontconfig.h>
15 display_fontset (FcFontSet *fs)
18 for (j = 0; j < fs->nfont; j++)
23 font = FcNameUnparse (fs->fonts[j]);
24 if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &str) == FcResultMatch)
25 printf ("FILE %s\n", str);
26 if (FcPatternGetString (fs->fonts[j], FC_FAMILY, 0, &str) == FcResultMatch)
27 printf ("family %s\n ", str);
28 if (FcPatternGetString (fs->fonts[j],
29 "designsize", 0, &str) == FcResultMatch)
30 printf ("designsize %s\n ", str);
32 printf ("%s\n", (const char*) font);
39 display_list (FcConfig *fcc)
41 FcPattern*pat = FcPatternCreate ();
45 os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, (char *) 0);
47 FcFontSet * fs = FcFontList (fcc, pat, os);
48 FcObjectSetDestroy (os);
50 FcPatternDestroy (pat);
55 FcFontSetDestroy (fs);
60 LY_DEFINE (ly_font_config_display_fonts, "ly:font-config-display-fonts", 0, 0, 0,
62 "Dump a list of all fonts visible to FontConfig.")
67 return SCM_UNSPECIFIED;