Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Commit

Permalink
[aux] assimilate logger to convention
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-gamma committed Dec 22, 2015
1 parent 44eadad commit c7e64e0
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions src/luaotfload-auxiliary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ luaotfload.aux = luaotfload.aux or { }

local aux = luaotfload.aux
local log = luaotfload.log
local report = log.report
local logreport = log.report
local fonthashes = fonts.hashes
local encodings = fonts.encodings
local identifiers = fonthashes.identifiers
Expand Down Expand Up @@ -54,8 +54,8 @@ local start_rewrite_fontname = function ()
rewrite_fontname,
"luaotfload.rewrite_fontname")
rewriting = true
report ("log", 1, "aux",
"start rewriting tfmdata.name field")
logreport ("log", 1, "aux",
"start rewriting tfmdata.name field")
end
end

Expand All @@ -66,8 +66,8 @@ local stop_rewrite_fontname = function ()
luatexbase.remove_from_callback
("luaotfload.patch_font", "luaotfload.rewrite_fontname")
rewriting = false
report ("log", 1, "aux",
"stop rewriting tfmdata.name field")
logreport ("log", 1, "aux",
"stop rewriting tfmdata.name field")
end
end

Expand Down Expand Up @@ -393,7 +393,7 @@ do

local load_chardef = function ()

report ("both", 1, "aux", "Loading character metadata from %s.", chardef)
logreport ("both", 1, "aux", "Loading character metadata from %s.", chardef)
chardata = dofile (kpse.find_file (chardef, "lua"))

if chardata == nil then
Expand Down Expand Up @@ -452,18 +452,18 @@ local provides_script = function (font_id, asked_script)
--- where method: "gpos" | "gsub"
for feature, data in next, featuredata do
if data[asked_script] then
report ("log", 1, "aux",
"font no %d (%s) defines feature %s for script %s",
font_id, fontname, feature, asked_script)
logreport ("log", 1, "aux",
"font no %d (%s) defines feature %s for script %s",
font_id, fontname, feature, asked_script)
return true
end
end
end
report ("log", 0, "aux",
"font no %d (%s) defines no feature for script %s",
font_id, fontname, asked_script)
logreport ("log", 0, "aux",
"font no %d (%s) defines no feature for script %s",
font_id, fontname, asked_script)
end
report ("log", 0, "aux", "no font with id %d", font_id)
logreport ("log", 0, "aux", "no font with id %d", font_id)
return false
end

Expand Down Expand Up @@ -491,21 +491,21 @@ 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
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)
logreport ("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
report ("log", 0, "aux",
"font no %d (%s) defines no feature "
.. "for script %s with language %s",
font_id, fontname, asked_script, asked_language)
logreport ("log", 0, "aux",
"font no %d (%s) defines no feature "
.. "for script %s with language %s",
font_id, fontname, asked_script, asked_language)
end
report ("log", 0, "aux", "no font with id %d", font_id)
logreport ("log", 0, "aux", "no font with id %d", font_id)
return false
end

Expand Down Expand Up @@ -564,20 +564,20 @@ local provides_feature = function (font_id, asked_script,
if feature then
local scriptdata = feature[asked_script]
if scriptdata and scriptdata[asked_language] then
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)
logreport ("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
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)
logreport ("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
report ("log", 0, "aux", "no font with id %d", font_id)
logreport ("log", 0, "aux", "no font with id %d", font_id)
return false
end

Expand Down

0 comments on commit c7e64e0

Please sign in to comment.