From 3cbef76101d9aaef3b2c355c58675bf9f386d949 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 21 May 2010 06:46:45 +0300 Subject: Sync with ConTeXt beta (beta 2010.05.20) --- otfl-font-tfm.lua | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'otfl-font-tfm.lua') 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() -- cgit v1.2.3