summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-05-11 08:20:38 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-05-11 08:20:38 +0300
commit7f48b3967c6af3b47728d756e235e2d735f1fe0d (patch)
treed69d80fef347337267c19879d188d523f41b0db3
parent05060aebf23d9262f43876060924d2dd95e56423 (diff)
downloadluaotfload-7f48b3967c6af3b47728d756e235e2d735f1fe0d.tar.gz
Skip names database for TFM fonts
if a tfm (or ofm) files exists with the same name, skip font names database. closes #3
-rw-r--r--otfl-font-nms.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 8ae245f..f856757 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -66,9 +66,14 @@ local synonyms = {
}
function names.resolve(specification)
+ local tfm = resolvers.find_file(specification.name, "ofm")
local name = sanitize(specification.name)
local style = sanitize(specification.style) or "regular"
local size = tonumber(specification.optsize) or specification.size and specification.size / 65536
+ if tfm then
+ -- is a tfm font, skip names database
+ return specification.name, false
+ end
if not loaded then
names.data = names.load()
loaded = true