From cd83d13014406c6e6dd8facf325c19bf0b51c432 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 25 Apr 2013 18:35:50 +0200 Subject: scan fontconfig dirs even though ``$OSFONTDIR`` is set This is essentially what this change to the TL2011 version does: https://github.com/lualatex/luaotfload/commit/31530badb2681ff3423fe31f5eccf3d05fab1956#L2R657 in response to this issue: https://github.com/lualatex/luaotfload/issues/11 --- fontdbutil.lua | 2 +- luaotfload-database.lua | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/fontdbutil.lua b/fontdbutil.lua index d76678f..3c60eec 100755 --- a/fontdbutil.lua +++ b/fontdbutil.lua @@ -269,7 +269,7 @@ actions.query = function (job) logs.names_report(false, 1, "resolve", "Font “%s” found!", query) logs.names_report(false, 1, - "resolve", "Resolved file name “%s”:", foundname) + "resolve", "Resolved file name “%s”", foundname) if job.show_info then show_font_info(foundname) end diff --git a/luaotfload-database.lua b/luaotfload-database.lua index bd664a6..1b13f69 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -1188,19 +1188,16 @@ update_names = function (fontnames, force) end local newfontnames = fontnames_init() read_blacklist() - --installed_fonts_scanned = false - --scan_installed_fonts(fontnames, newfontnames) --- see fixme above - local scanned, new = scan_texmf_fonts(fontnames, newfontnames) + + local scanned, new + scanned, new = scan_texmf_fonts(fontnames, newfontnames) n_scanned = n_scanned + scanned n_new = n_new + new - --if not installed_fonts_scanned - --and stringis_empty(kpseexpand_path("$OSFONTDIR")) - if stringis_empty(kpseexpand_path("$OSFONTDIR")) - then - local scanned, new = scan_os_fonts(fontnames, newfontnames) - n_scanned = n_scanned + scanned - n_new = n_new + new - end + + scanned, new = scan_os_fonts(fontnames, newfontnames) + n_scanned = n_scanned + scanned + n_new = n_new + new + --- stats: --- before rewrite | after rewrite --- partial: 804 ms | 701 ms -- cgit v1.2.3