summaryrefslogtreecommitdiff
path: root/otfl-font-tfm.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-05-21 06:46:45 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-05-21 07:07:28 +0300
commit3cbef76101d9aaef3b2c355c58675bf9f386d949 (patch)
treee11465e3a2ae642973a74ec1a5202d5cf815b176 /otfl-font-tfm.lua
parent7714c6972814b0ff3175479b09d0139dd67c6ab0 (diff)
downloadluaotfload-3cbef76101d9aaef3b2c355c58675bf9f386d949.tar.gz
Sync with ConTeXt beta (beta 2010.05.20)
Diffstat (limited to 'otfl-font-tfm.lua')
-rw-r--r--otfl-font-tfm.lua27
1 files changed, 26 insertions, 1 deletions
diff --git a/otfl-font-tfm.lua b/otfl-font-tfm.lua
index 4b217a3..31ae2ca 100644
--- a/otfl-font-tfm.lua
+++ b/otfl-font-tfm.lua
@@ -279,7 +279,7 @@ t.colorscheme = tfmtable.colorscheme
local characters = tfmtable.characters
local nameneeded = not tfmtable.shared.otfdata --hack
local changed = tfmtable.changed or { } -- for base mode
- local ischanged = not table.is_empty(changed)
+ local ischanged = changed and next(changed)
local indices = tfmtable.indices
local luatex = tfmtable.luatex
local tounicode = luatex and luatex.tounicode
@@ -704,6 +704,31 @@ function tfm.replacements(tfm,value)
-- tfm.characters[0x0060] = tfm.characters[0x2018]
end
+-- checking
+
+function tfm.checked_filename(metadata,whatever)
+ local foundfilename = metadata.foundfilename
+ if not foundfilename then
+ local askedfilename = metadata.filename or ""
+ if askedfilename ~= "" then
+ foundfilename = resolvers.findbinfile(askedfilename,"") or ""
+ if foundfilename == "" then
+ logs.report("fonts","source file '%s' is not found",askedfilename)
+ foundfilename = resolvers.findbinfile(file.basename(askedfilename),"") or ""
+ if foundfilename ~= "" then
+ logs.report("fonts","using source file '%s' (cache mismatch)",foundfilename)
+ end
+ end
+ elseif whatever then
+ logs.report("fonts","no source file for '%s'",whatever)
+ foundfilename = ""
+ end
+ metadata.foundfilename = foundfilename
+ -- logs.report("fonts","using source file '%s'",foundfilename)
+ end
+ return foundfilename
+end
+
-- status info
statistics.register("fonts load time", function()