- String path = dirs[i];
- if (!FcConfigAppFontAddDir (fcc, (FcChar8*)path.to_str0 ()))
- {
- error (_f ("Failed to add lilypond directory %s", path.to_str0 ()));
- }
- }
+ string dir = dirs[i];
+ if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.c_str ()))
+ error (_f ("failed adding font directory: %s", dir.c_str ()));
+ else if (be_verbose_global)
+ message (_f ("adding font directory: %s", dir.c_str ()));
+ }
+
+ if (be_verbose_global)
+ message (_ ("Building font database..."));
+
+ FcConfigBuildFonts (font_config_global);
+ FcConfigSetCurrent (font_config_global);
+
+ if (be_verbose_global)
+ message ("\n");
+