From 7f48b3967c6af3b47728d756e235e2d735f1fe0d Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 11 May 2010 08:20:38 +0300 Subject: Skip names database for TFM fonts if a tfm (or ofm) files exists with the same name, skip font names database. closes #3 --- otfl-font-nms.lua | 5 +++++ 1 file changed, 5 insertions(+) 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 -- cgit v1.2.3