diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-15 01:01:25 +0200 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-04-15 01:01:25 +0200 | 
| commit | 283761cb68bff34c7d69a96b563382aa5e5a5142 (patch) | |
| tree | da8b4b8a98b52bcdbe731de92e2061ead3d41688 | |
| parent | 5a8c4657de6b599e1897d8ac4e685264e0ac0587 (diff) | |
| download | luaotfload-283761cb68bff34c7d69a96b563382aa5e5a5142.tar.gz | |
finish move to new loggers
| -rw-r--r-- | otfl-font-ltx.lua | 10 | ||||
| -rw-r--r-- | otfl-luat-ovr.lua | 20 | 
2 files changed, 8 insertions, 22 deletions
diff --git a/otfl-font-ltx.lua b/otfl-font-ltx.lua index 4a86593..d1799d7 100644 --- a/otfl-font-ltx.lua +++ b/otfl-font-ltx.lua @@ -24,6 +24,8 @@ end  local feature_list = { } +local report = logs.names_report +  --- ugh TODO use lpeg instead  local function isstyle(s)      local style  = string.lower(s):split("/") @@ -37,7 +39,8 @@ local function isstyle(s)          elseif v:find("^s=") then              feature_list.optsize = v:split("=")[2]          elseif v == "aat" or v == "icu" or v == "gr" then -            logs.report("load font", "unsupported font option: %s", v) +            report("log", 0, +                "load font", "unsupported font option: %s", v)          elseif not v:is_empty() then              feature_list.style = v:gsub("[^%a%d]", "")          end @@ -98,7 +101,9 @@ defaults.lao  = defaults.thai  local function set_default_features(script)      local features      local script = script or "dflt" -    logs.report("load font", "auto-selecting default features for script: %s", script) +    report("log", 0, "load font", +        "auto-selecting default features for script: %s", +        script)      if defaults[script] then          features = defaults[script]      else @@ -195,3 +200,4 @@ function fonts.definers.applypostprocessors(tfmdata)      end      return tfmdata  end +-- vim:tw=71:sw=4:ts=4:expandtab diff --git a/otfl-luat-ovr.lua b/otfl-luat-ovr.lua index 0657bbe..c57c68e 100644 --- a/otfl-luat-ovr.lua +++ b/otfl-luat-ovr.lua @@ -37,26 +37,6 @@ local set_loglevel = function (n)  end  logs.set_loglevel = set_loglevel -function logs.report(category,fmt,...) -    if fmt then -        texiowrite_nl('log', stringformat("%s | %s: %s",module_name,category,stringformat(fmt,...))) -    elseif category then -        texiowrite_nl('log', stringformat("%s | %s",module_name,category)) -    else -        texiowrite_nl('log', stringformat("%s |",module_name)) -    end -end - -logs.names_search = function (category, fmt, ...) -    if loglevel > 2 then -        local res = { module_name, " |" } -        if category then res[#res+1] = " " .. category end -        if fmt      then res[#res+1] = ": " .. stringformat(fmt, ...) end -        texiowrite_nl("log", tableconcat(res)) -    end -end - -  local log = function (category, fmt, ...)      local res = { module_name, " |" }      if category then res[#res+1] = " " .. category end  | 
