]> git.donarmstrong.com Git - lilypond.git/blob - lily/font-config.cc
(do_file): do i18n only once.
[lilypond.git] / lily / font-config.cc
1 /*
2   font-config.cc -- implement Font_config related functions
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
7
8 */
9
10 #include "config.hh"
11
12 #ifdef HAVE_PANGO_FT2
13
14 #include <fontconfig/fontconfig.h>
15
16 #include "main.hh"
17 #include "warn.hh"
18
19 void
20 init_fontconfig ()
21 {
22   if (!FcInit())
23     {
24       error ("FontConfig failed to initialize"); 
25     }
26
27   char const **dirs = prefix_directories;
28   for (; *dirs; dirs++)
29     {
30       String path = String (*dirs) + "/" + "otf";
31       
32       if (!FcConfigAppFontAddDir (0, (FcChar8*)path.to_str0 ()))
33         {
34           error (_f ("Failed to add lilypond directory %s", path.to_str0 ()));
35         }
36     }     
37 }
38
39 #else
40
41 void init_fontconfig() {}
42 #endif