]> git.donarmstrong.com Git - lilypond.git/commitdiff
($(outdir)/fonts.cache-1): create font cache for
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 17 Jun 2005 12:34:07 +0000 (12:34 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 17 Jun 2005 12:34:07 +0000 (12:34 +0000)
outdir.
(install-fc-cache): insatll font cache in installation directories.

ChangeLog
Documentation/user/introduction.itely
Documentation/user/lily-flat-bw.png
lily/font-config.cc
mf/GNUmakefile

index 745aef39b149ee5e12070bc3e1ab25e8c30d034c..7866304e39adef74add8c02251b45b3689e27e94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-17  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * mf/GNUmakefile ($(outdir)/fonts.cache-1): create font cache for
+       outdir.
+       (install-fc-cache): insatll font cache in installation directories.
+
 2005-06-17  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/editor.scm (editor-command-template-alist): Use char iso
index fdae1d65dc2a63d34fd1a58bb9ae6bf9e3c0f17c..39fad96e9068a8000e971fc5af999d888e301819 100644 (file)
@@ -58,23 +58,23 @@ computer edition.
 @item @tab
 @ifnotinfo
 @iftex
-@image{henle-flat-bw,4cm}
+@image{henle-flat-gray,,8cm}
 @end iftex
 @ifnottex
-@image{henle-flat-bw,,,png}
+@image{henle-flat-gray,,,png}
 @end ifnottex
 
 @tab
 @iftex
-@image{baer-flat-bw,4cm}
+@image{baer-flat-gray,,8.4cm}
 @end iftex
 @ifnottex
-@image{baer-flat-bw,,,png}
+@image{baer-flat-gray,,,png}
 @end ifnottex
 
 @tab
 @iftex
-@image{lily-flat-bw,4cm}
+@image{lily-flat-bw,,8cm}
 @end iftex
 @ifnottex
 @image{lily-flat-bw,,,png}
index 23de1a42033f5c5bd95bd007ae7b99e4a464a7cf..b67c626a475bc918cc4b06b0ae8846cca95934af 100644 (file)
Binary files a/Documentation/user/lily-flat-bw.png and b/Documentation/user/lily-flat-bw.png differ
index 8954c809f40f6bc454a715eec638dd7c20ab4659..2c1dfb0a3414f31d6883df2a864eafc67e50725d 100644 (file)
@@ -16,6 +16,8 @@
 #include "main.hh"
 #include "warn.hh"
 
+FcConfig *font_config_global = 0;
+
 void
 init_fontconfig ()
 {
@@ -23,22 +25,11 @@ init_fontconfig ()
     message (_ ("Initializing FontConfig..."));
   
   if (!FcInit ())
-    error (_ ("initializing FontConfig"));
-
-  FcConfig *fcc = FcConfigGetCurrent ();
+    error (_ ("initializing FontConfig failed"));
 
 
-#if 0
-  /*
-    Hmm. the cache is always out of date??!
-   */
-  FcChar8 *cache = FcConfigGetCache (fcc);
-  if (!FcDirCacheValid (cache))
-    {
-      warning (_ ("FontConfig cache out of date. Rebuilding may take some time."));
-    }
-#endif
   
+  font_config_global = FcConfigGetCurrent ();
   Array<String> dirs;
   struct stat statbuf; 
   String builddir = prefix_directory + "/mf/out/";
@@ -55,7 +46,7 @@ init_fontconfig ()
   for (int i = 0; i < dirs.size (); i++)
     {
       String dir = dirs[i];
-      if (!FcConfigAppFontAddDir (fcc, (FcChar8 *)dir.to_str0 ()))
+      if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.to_str0 ()))
        error (_f ("adding font directory: %s", dir.to_str0 ()));
       else if (be_verbose_global)
        message (_f ("adding font directory: %s", dir.to_str0 ()));
index 00076c5f6207b1561e0b880e9f07d5c7367dbdda..cee0de6fa6197db9f42b250c3770f8c4da78b521 100644 (file)
@@ -125,13 +125,20 @@ $(outdir)/aybabtu.subfonts:
 $(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts.py
        $(PYTHON) $< --dir=$(outdir)
 
+$(outdir)/fonts.cache-1: $(PFA_OTF_FILES) $(PFA_FILES) $(OTF_FILES)
+       cd $(outdir) ; fc-cache .
+
+local-install: install-fc-cache
+
+install-fc-cache:
+       fc-cache $(foreach suff, $(INSTALLATION_OUT_SUFFIXES), $(DESTDIR)$(INSTALLATION_OUT_DIR$(suff)))
 
 ALL_FONTS = $(FETA_FONTS) $(SAUTER_FONTS)
 PFA_FILES = $(ALL_FONTS:%=$(outdir)/%.pfa) $(PFA_OTF_FILES)
 
 # Make tfm files first, log files last, 
 # so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES)  $(OTF_TABLES) $(PFA_FILES) $(OTF_FILES) $(SVG_FILES)
+ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES)  $(OTF_TABLES) $(PFA_FILES) $(OTF_FILES) $(SVG_FILES) $(outdir)/font.cache-1
 
 #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
 INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source