]> git.donarmstrong.com Git - lilypond.git/commitdiff
(init_fontconfig): do the init if
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 8 Jun 2006 16:32:53 +0000 (16:32 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 8 Jun 2006 16:32:53 +0000 (16:32 +0000)
cache_file, but don't look at cache_file.

ChangeLog
lily/font-config.cc

index d7442542c604f25f1a966c0b88463ab8718648bf..aee68cfa88ee7dad0ba9660769091bb7998d6687 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-06-08  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * lily/font-config.cc (init_fontconfig): do the init if
+       cache_file, but don't look at cache_file.
+
        * input/regression/quote-tie.ly: new file.
 
        * lily/tie-engraver.cc (struct Head_event_tuple): add end_moment_
index ad66c7870834fc8ffd9e5370bfc6263ede258188..7cea2fcfdee321295085ff37b64a572512fa05a9 100644 (file)
@@ -30,17 +30,12 @@ init_fontconfig ()
   font_config_global = FcInitLoadConfig ();
   FcChar8 *cache_file = FcConfigGetCache (font_config_global);
 
-  if (!cache_file)
-    {
-      programming_error ("global fontconfig cache_file not found");
-      return;
-    }
-  
   /*
     This is a terrible kludge, but there is apparently no way for
     FontConfig to signal whether it needs to rescan directories.
    */ 
-  if (!is_file ((char*)cache_file))
+  if (cache_file
+      && !is_file ((char const *)cache_file))
     message (_f ("Rebuilding FontConfig cache %s, this may take a while...", cache_file));
                        
   vector<string> dirs;
@@ -64,7 +59,8 @@ init_fontconfig ()
   if (be_verbose_global)
     progress_indication ("\n");
 
-  if (!is_file ((char*)cache_file))
+  if (cache_file
+      && !is_file ((char*)cache_file))
     {
       /* inhibit future messages. */
       FILE *f = fopen ((char*)cache_file, "w");