]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/font-config.cc
remove TEXMF from variables.
[lilypond.git] / lily / font-config.cc
index 4871c583032484225c36121b63e3d41f93bb53a2..e75561942fe67b4e790f784ffe997488dd40024b 100644 (file)
@@ -4,47 +4,44 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
 */
 
 #include "config.hh"
 
-#ifdef HAVE_PANGO_FT2
+#ifdef HAVE_FONTCONFIG
 
 #include <fontconfig/fontconfig.h>
 
+#include "file-path.hh"
 #include "main.hh"
 #include "warn.hh"
-#include "file-path.hh"
 
 void
 init_fontconfig ()
 {
-  if (!FcInit())
-    {
-      error ("FontConfig failed to initialize"); 
-    }
+  if (!FcInit ())
+    error (_ ("FontConfig failed to initialize"));
 
   FcConfig *fcc = FcConfigGetCurrent ();
 
-  
   Array<String> dirs;
-  dirs.push (prefix_directory + "/otf/");
+  dirs.push (prefix_directory + "/fonts/otf/");
   dirs.push (prefix_directory + "/mf/out/");
-  dirs.push (prefix_directory + "/type1/");
-  dirs.push (prefix_directory + "/cff/");
-  
-  for (int i = 0; i < dirs.size(); i++)
+  dirs.push (prefix_directory + "/fonts/type1/");
+  dirs.push (prefix_directory + "/fonts/cff/");
+
+  for (int i = 0; i < dirs.size (); i++)
     {
-      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 (fcc, (FcChar8 *)dir.to_str0 ()))
+       error (_f ("Failed to add lilypond directory %s", dir));
+    }
 }
 
 #else
 
-void init_fontconfig() {}
+void
+init_fontconfig ()
+{
+}
 #endif