summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2011-10-01 19:07:24 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2011-10-01 19:07:24 +0200
commitd8753a1c461d18b51219d5fec7e39f2567b8c908 (patch)
treef6363a3951cb0e864ff90060606c88f27723efeb
parent852cd5b8e7c01fd58763cd499f5666a65724bd26 (diff)
downloadluaotfload-d8753a1c461d18b51219d5fec7e39f2567b8c908.tar.gz
Try /usr/local/etc/fonts/fonts.conf before /etc/fonts/fonts.conf
closes #34
-rw-r--r--otfl-font-nms.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 538c6b0..6793830 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -669,7 +669,11 @@ local function get_os_dirs()
local windir = os.getenv("WINDIR")
return { file.join(windir, 'Fonts') }
else
- return read_fonts_conf("/etc/fonts/fonts.conf", {})
+ 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", {})
+ end
+ end
end
end