2 font-config.cc -- implement FontConfig related functions
4 source file of the GNU LilyPond music typesetter
6 (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
13 #include <fontconfig/fontconfig.h>
15 #include "file-path.hh"
19 FcConfig *font_config_global = 0;
24 if (be_verbose_global)
25 message (_ ("Initializing FontConfig..."));
28 error (_ ("initializing FontConfig failed"));
30 font_config_global = FcConfigGetCurrent ();
36 dirs.push (prefix_directory + "/fonts/otf/");
37 dirs.push (prefix_directory + "/fonts/type1/");
38 dirs.push (prefix_directory + "/fonts/cff/");
39 dirs.push (prefix_directory + "/fonts/svg/");
41 for (int i = 0; i < dirs.size (); i++)
44 if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.to_str0 ()))
45 error (_f ("adding font directory: %s", dir.to_str0 ()));
46 else if (be_verbose_global)
47 message (_f ("adding font directory: %s", dir.to_str0 ()));
50 if (be_verbose_global)
51 progress_indication ("\n");