summaryrefslogtreecommitdiff
path: root/otfl-font-nms.lua
diff options
context:
space:
mode:
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r--otfl-font-nms.lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 39dac5b..b64292e 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -522,12 +522,35 @@ local function scan_dir(dirname, fontnames, newfontnames, texmf)
if trace_search then
logs.report("%d fonts found in '%s'", nbfound, dirname)
end
+ list = remove_ignore_fonts(list) -- fixme: general solution required
for _,fnt in ipairs(list) do
fnt = path_normalize(fnt)
load_font(fnt, fontnames, newfontnames, texmf)
end
end
+-- Temporary until a general solution is implemented:
+if os.name == "macosx" then
+ ignore_fonts = {
+ -- this font kills the indexer:
+ "/System/Library/Fonts/LastResort.ttf"
+ }
+ function remove_ignore_fonts(fonts)
+ for N,fnt in ipairs(fonts) do
+ if table.contains(ignore_fonts,fnt) then
+ logs.report("ignoring font '%s'", fnt)
+ table.remove(fonts,N)
+ end
+ end
+ return fonts
+ end
+-- This function is only necessary, for now, on Mac OS X.
+else
+ function remove_ignore_fonts(fonts)
+ return fonts
+ end
+end
+
local function scan_texmf_tree(fontnames, newfontnames)
--[[
The function that scans all fonts in the texmf tree, through kpathsea