diff options
author | Will Robertson <wspr81@gmail.com> | 2010-05-19 15:46:40 +0930 |
---|---|---|
committer | Will Robertson <wspr81@gmail.com> | 2010-05-19 18:13:33 +0930 |
commit | 8caeb05b062b5a946243337fca5f736fdbec2b74 (patch) | |
tree | 696f0cb9f99b9cd5e231c164814d8259cf6d7965 /otfl-font-nms.lua | |
parent | ac9ec67a4942ae8d1aa3e9d4d3c00d7794e04390 (diff) | |
download | luaotfload-8caeb05b062b5a946243337fca5f736fdbec2b74.tar.gz |
temporary fix to avoid LastResort.ttf
Sorry no time to implement a general solution
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r-- | otfl-font-nms.lua | 23 |
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 |