summaryrefslogtreecommitdiff
path: root/luaotfload-auxiliary.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-02-09 15:15:46 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2014-02-09 15:15:46 +0100
commite069690a7f747f7b17baed6974168192857eb485 (patch)
tree5705351f4ebbc439fbb04d17a4942ba85db3ebbc /luaotfload-auxiliary.lua
parent405ff5a3f24566f76a3d08d7ba217a137fcb5bdd (diff)
downloadluaotfload-e069690a7f747f7b17baed6974168192857eb485.tar.gz
[log,*] move logs -> luaotfload.log
Next step toward https://github.com/lualatex/luaotfload/issues/169 Signed-off-by: Philipp Gesang <phg42.2a@gmail.com>
Diffstat (limited to 'luaotfload-auxiliary.lua')
-rw-r--r--luaotfload-auxiliary.lua61
1 files changed, 32 insertions, 29 deletions
diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua
index 334ac47..9ab78e7 100644
--- a/luaotfload-auxiliary.lua
+++ b/luaotfload-auxiliary.lua
@@ -17,7 +17,7 @@ luaotfload.aux = luaotfload.aux or { }
local aux = luaotfload.aux
local log = luaotfload.log
-local warning = luaotfload.log
+local report = log.names_report
local fonthashes = fonts.hashes
local identifiers = fonthashes.identifiers
@@ -54,8 +54,8 @@ local start_rewrite_fontname = function ()
rewrite_fontname,
"luaotfload.rewrite_fontname")
rewriting = true
- logs.names_report ("log", 0, "aux",
- "start rewriting tfmdata.name field")
+ report ("log", 0, "aux",
+ "start rewriting tfmdata.name field")
end
end
@@ -66,8 +66,8 @@ local stop_rewrite_fontname = function ()
luatexbase.remove_fromt_callback
("luaotfload.patch_font", "luaotfload.rewrite_fontname")
rewriting = false
- logs.names_report ("log", 0, "aux",
- "stop rewriting tfmdata.name field")
+ report ("log", 0, "aux",
+ "stop rewriting tfmdata.name field")
end
end
@@ -366,7 +366,7 @@ do
local load_chardef = function ()
- log ("Loading character metadata from %s.", chardef)
+ report ("both", 1, "aux", "Loading character metadata from %s.", chardef)
chardata = dofile (kpse.find_file (chardef, "lua"))
if chardata == nil then
@@ -424,19 +424,19 @@ local provides_script = function (font_id, asked_script)
--- where method: "gpos" | "gsub"
for feature, data in next, featuredata do
if data[asked_script] then
- log(stringformat(
- "font no %d (%s) defines feature %s for script %s",
- font_id, fontname, feature, asked_script))
+ report ("log", 1, "aux",
+ "font no %d (%s) defines feature %s for script %s",
+ font_id, fontname, feature, asked_script)
return true
end
end
end
- log(stringformat(
- "font no %d (%s) defines no feature for script %s",
- font_id, fontname, asked_script))
+ report ("log", 0, "aux",
+ "font no %d (%s) defines no feature for script %s",
+ font_id, fontname, asked_script)
end
end
- log(stringformat("no font with id %d", font_id))
+ report ("log", 0, "aux", "no font with id %d", font_id)
return false
end
@@ -463,20 +463,22 @@ local provides_language = function (font_id, asked_script, asked_language)
for feature, data in next, featuredata do
local scriptdata = data[asked_script]
if scriptdata and scriptdata[asked_language] then
- log(stringformat("font no %d (%s) defines feature %s "
- .. "for script %s with language %s",
- font_id, fontname, feature,
- asked_script, asked_language))
+ report ("log", 1, "aux",
+ "font no %d (%s) defines feature %s "
+ .. "for script %s with language %s",
+ font_id, fontname, feature,
+ asked_script, asked_language)
return true
end
end
end
- log(stringformat(
- "font no %d (%s) defines no feature for script %s with language %s",
- font_id, fontname, asked_script, asked_language))
+ report ("log", 0, "aux",
+ "font no %d (%s) defines no feature "
+ .. "for script %s with language %s",
+ font_id, fontname, asked_script, asked_language)
end
end
- log(stringformat("no font with id %d", font_id))
+ report ("log", 0, "aux", "no font with id %d", font_id)
return false
end
@@ -534,20 +536,21 @@ local provides_feature = function (font_id, asked_script,
if feature then
local scriptdata = feature[asked_script]
if scriptdata and scriptdata[asked_language] then
- log(stringformat("font no %d (%s) defines feature %s "
- .. "for script %s with language %s",
- font_id, fontname, asked_feature,
- asked_script, asked_language))
+ report ("log", 1, "aux",
+ "font no %d (%s) defines feature %s "
+ .. "for script %s with language %s",
+ font_id, fontname, asked_feature,
+ asked_script, asked_language)
return true
end
end
end
- log(stringformat(
- "font no %d (%s) does not define feature %s for script %s with language %s",
- font_id, fontname, asked_feature, asked_script, asked_language))
+ report ("log", 0, "aux",
+ "font no %d (%s) does not define feature %s for script %s with language %s",
+ font_id, fontname, asked_feature, asked_script, asked_language)
end
end
- log(stringformat("no font with id %d", font_id))
+ report ("log", 0, "aux", "no font with id %d", font_id)
return false
end