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], "designsize", 0, &str) == FcResultMatch)
29 printf ("designsize %s\n ", str);
30 printf ("%s\n", font);
37 display_list (FcConfig *fcc)
39 FcPattern*pat = FcPatternCreate ();
43 os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, (char *) 0);
45 FcFontSet * fs = FcFontList (fcc, pat, os);
46 FcObjectSetDestroy (os);
48 FcPatternDestroy (pat);
53 FcFontSetDestroy (fs);
58 LY_DEFINE (ly_font_config_display_fonts, "ly:font-config-display-fonts", 0, 0, 0,
60 "Dump a list of all fonts visible to FontConfig.")
65 return SCM_UNSPECIFIED;