From 23e1877b0d9f44451da6fcc6d3c8201978d77d15 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 17 May 2005 12:00:20 +0000 Subject: [PATCH] * scm/lily.scm (running-from-gui?): Darwin never runs from GUI. * lily/font-config.cc (init_fontconfig): add warning about cache. --- ChangeLog | 6 ++++++ lily/font-config.cc | 7 +++++++ scm/lily.scm | 9 +++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 927ed21c39..2c09fedc70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-05-17 Han-Wen Nienhuys + + * scm/lily.scm (running-from-gui?): Darwin never runs from GUI. + + * lily/font-config.cc (init_fontconfig): add warning about cache. + 2005-05-16 Jan Nieuwenhuizen * lily/main.cc (setup_paths)[ARGV0_RELOCATION]: diff --git a/lily/font-config.cc b/lily/font-config.cc index d74dec9691..8a2303d52d 100644 --- a/lily/font-config.cc +++ b/lily/font-config.cc @@ -26,6 +26,13 @@ init_fontconfig () error (_ ("initializing FontConfig")); FcConfig *fcc = FcConfigGetCurrent (); + + FcChar8 *cache = FcConfigGetCache (fcc); + if (!FcDirCacheValid (cache)) + { + warning (_ ("FontConfig cache out of date. Rebuilding may take some time.")); + } + Array dirs; struct stat statbuf; String builddir = prefix_directory + "/mf/out/"; diff --git a/scm/lily.scm b/scm/lily.scm index 160fdd173b..a4ba292859 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -375,10 +375,15 @@ The syntax is the same as `define*-public'." (define (running-from-gui?) (let ((have-tty? (isatty? (current-input-port)))) + ;; If no TTY and not using safe, assume running from GUI. ;; For mingw, the test must be inverted. - (if (eq? PLATFORM 'windows) - have-tty? (not have-tty?)))) + + (cond + ((eq? PLATFORM 'windows) have-tty?) + ((eq? PLATFORM 'Darwin) #f) + (else + (not have-tty?))))) (define-public (gui-main files) (if (null? files) (gui-no-files-handler)) -- 2.39.5