summaryrefslogtreecommitdiff
path: root/otfl-font-nms.lua
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-21 15:29:44 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-21 15:29:44 +0200
commit397c25951b2b1fd8e67e2ddea651b0ee953b0f36 (patch)
tree101bd2ef03a63fb2553a9fa29804d9c6a68ba5a7 /otfl-font-nms.lua
parent14b3ba09e583caaa7e31ab7bfabc4871cbb206fd (diff)
downloadluaotfload-397c25951b2b1fd8e67e2ddea651b0ee953b0f36.tar.gz
A wonderful bug fix
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r--otfl-font-nms.lua9
1 files 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