From 397c25951b2b1fd8e67e2ddea651b0ee953b0f36 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Sun, 21 Apr 2013 15:29:44 +0200 Subject: A wonderful bug fix --- otfl-font-nms.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index 3ee6ee4..c9c700c 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -927,12 +927,17 @@ local function get_os_dirs() elseif os.type == "windows" or os.type == "msdos" or os.name == "cygwin" then local windir = os.getenv("WINDIR") return { filejoin(windir, 'Fonts') } - else --- TODO what about ~/config/fontconfig/fonts.conf etc? + else + local passed_paths = {} + local os_dirs = {} + -- what about ~/config/fontconfig/fonts.conf etc? + -- Answer: they should be included by the others, please report if it's not for _,p in next, {"/usr/local/etc/fonts/fonts.conf", "/etc/fonts/fonts.conf"} do if lfs.isfile(p) then - return read_fonts_conf("/etc/fonts/fonts.conf", {}, {}) + read_fonts_conf(p, os_dirs, passed_paths) end end + return os_dirs end return {} end -- cgit v1.2.3