From fd6045eb7dc0fae4a6d18db4386d29363a3ba192 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 11 Jan 2006 01:57:02 +0000 Subject: [PATCH] (LY_DEFINE): also display font and config dirs. Aids debugging. --- ChangeLog | 5 +++++ Documentation/topdocs/NEWS.tely | 2 +- lily/font-config-scheme.cc | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 797cbf989d..163b5bf1d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-01-11 Han-Wen Nienhuys + + * lily/font-config-scheme.cc (LY_DEFINE): also display font and + config dirs. Aids debugging. + 2006-01-07 Han-Wen Nienhuys * lily/bar-line.cc (calc_bar_size): inspect staff->extent (Y_AXIS) diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index 8939f8f22d..a72abdfeaf 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -52,7 +52,7 @@ example @lilypond[raggedright] \new Staff \relative c' { - \override Staff.StaffSymbol #'line-positions = #'(-7 -2 0 3 9) + \override Staff.StaffSymbol #'line-positions = #'(-7 -2 0 7) g c f b e a } @end lilypond diff --git a/lily/font-config-scheme.cc b/lily/font-config-scheme.cc index 662a9a5608..157d1bb911 100644 --- a/lily/font-config-scheme.cc +++ b/lily/font-config-scheme.cc @@ -34,6 +34,21 @@ display_fontset (FcFontSet *fs) } } +void +display_strlist (char const*what, FcStrList *slist) +{ + while (FcChar8 *dir = FcStrListNext (slist)) + { + printf("%s: %s\n", what, dir); + } +} + +void +display_dirs (FcConfig *fcc) +{ + display_strlist ("config dir", FcConfigGetConfigDirs(fcc)); + display_strlist ("font dir", FcConfigGetFontDirs(fcc)); +} void display_list (FcConfig *fcc) @@ -60,9 +75,9 @@ display_list (FcConfig *fcc) LY_DEFINE (ly_font_config_display_fonts, "ly:font-config-display-fonts", 0, 0, 0, (), "Dump a list of all fonts visible to FontConfig.") - { display_list (NULL); + display_dirs (NULL); return SCM_UNSPECIFIED; } -- 2.39.5