diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-02-06 23:19:17 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-02-06 23:19:17 +0200 |
commit | e133632df9fc035af0deaad333305815047c8b0a (patch) | |
tree | 5baaa2250cf3037e579127b76ae4cb4a08215d04 /otfl-font-dum.lua | |
parent | f3d46d2fde7530e5d471dd68c8e66e5351409c2a (diff) | |
download | luaotfload-e133632df9fc035af0deaad333305815047c8b0a.tar.gz |
Some logging
Diffstat (limited to 'otfl-font-dum.lua')
-rw-r--r-- | otfl-font-dum.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/otfl-font-dum.lua b/otfl-font-dum.lua index 2cc8aeb..9b04b86 100644 --- a/otfl-font-dum.lua +++ b/otfl-font-dum.lua @@ -73,6 +73,7 @@ function fonts.names.resolve(specification) local foundname = resolvers.find_file(basename,format) or "" if foundname ~= "" then data = dofile(foundname) + logs.report("load font", "loaded font names database: %s", foundname) break end end @@ -85,24 +86,26 @@ function fonts.names.resolve(specification) if family and type(family) == "table" then for _,v in ipairs(family) do local face = data.mappings[v] - local subfamily = face.names.subfamily + local subfamily = sanitize(face.names.subfamily) local rqssize = tonumber(specification.optsize) or specification.size and specification.size / 65536 local dsnsize = face.size[1] and face.size[1] / 10 local maxsize = face.size[2] and face.size[2] / 10 local minsize = face.size[3] and face.size[3] / 10 local filename = face.filename if subfamily then - if sanitize(subfamily) == style then + if subfamily == style then if not dsnsize or dsnsize == rqssize or (rqssize > minsize and rqssize <= maxsize) then found = filename + logs.report("load font", "font family='%s', subfamily='%s' found: %s", name, style, found) break end else if synonyms[style] then for _,v in ipairs(synonyms[style]) do - if sanitize(subfamily) == v then + if subfamily == v then if not dsnsize or dsnsize == rqssize or (rqssize > minsize and rqssize <= maxsize) then found = filename + logs.report("load font", "font family='%s', subfamily='%s' found: %s", name, style, found) break end end @@ -119,7 +122,7 @@ function fonts.names.resolve(specification) end end end - logs.report("define font", "Font names database version mismatch") + logs.report("load font", "Font names database version mismatch") end fonts.names.resolvespec = fonts.names.resolve -- only supported in mkiv |