From: Han-Wen Nienhuys Date: Fri, 17 Jun 2005 12:34:07 +0000 (+0000) Subject: ($(outdir)/fonts.cache-1): create font cache for X-Git-Tag: release/2.6.0~38 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4516c9ff0c6b1cfc9b0245486a37a90cf487318e;p=lilypond.git ($(outdir)/fonts.cache-1): create font cache for outdir. (install-fc-cache): insatll font cache in installation directories. --- diff --git a/ChangeLog b/ChangeLog index 745aef39b1..7866304e39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-17 Han-Wen Nienhuys + + * 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 * scm/editor.scm (editor-command-template-alist): Use char iso diff --git a/Documentation/user/introduction.itely b/Documentation/user/introduction.itely index fdae1d65dc..39fad96e90 100644 --- a/Documentation/user/introduction.itely +++ b/Documentation/user/introduction.itely @@ -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} diff --git a/Documentation/user/lily-flat-bw.png b/Documentation/user/lily-flat-bw.png index 23de1a4203..b67c626a47 100644 Binary files a/Documentation/user/lily-flat-bw.png and b/Documentation/user/lily-flat-bw.png differ diff --git a/lily/font-config.cc b/lily/font-config.cc index 8954c809f4..2c1dfb0a34 100644 --- a/lily/font-config.cc +++ b/lily/font-config.cc @@ -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 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 ())); diff --git a/mf/GNUmakefile b/mf/GNUmakefile index 00076c5f62..cee0de6fa6 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -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