summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2010-05-19 22:16:53 +0300
committerElie Roux <elie.roux@telecom-bretagne.eu>2010-05-19 22:16:53 +0300
commit288c14652b8c569db532d034646a705a7a42b7c2 (patch)
treef9faba2cb35bd4219c15c6a23821c31a9ef3881d
parent2851461171752f7f3ba6d9461b438add580bc311 (diff)
downloadluaotfload-288c14652b8c569db532d034646a705a7a42b7c2.tar.gz
Initializing kpse.init_prog
This prevents the call to the pk maker program (that prints an error saying that the pk already exists). This file is not really the place to put such an initialization, I think it should go in the format, but we cannot right now.
-rw-r--r--otfl-font-nms.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index 9a08446..98ae227 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -13,6 +13,13 @@ if fonts and fonts.tfm and fonts.tfm.readers then
fonts.tfm.readers.ofm = fonts.tfm.readers.tfm
end
+-- This is a necessary initalization in order not to rebuild an existing font.
+-- Maybe 600 should be replaced by \pdfpkresolution
+-- or texconfig.pk_dpi (and it should be replaced dynamically), but we don't
+-- have access (yet) to the texconfig table, so we let it be 600. Anyway, it
+-- does still work fine even if \pdfpkresolution is changed.
+kpse.init_prog('', 600, '/')
+
fonts = fonts or { }
fonts.names = fonts.names or { }
@@ -121,7 +128,6 @@ local reloaded = false
function names.resolve(specification)
local tfm = resolvers.find_file(specification.name, "tfm")
- local ofm = resolvers.find_file(specification.name, "ofm")
local ext = lower(file.extname(specification.name))
if tfm then
@@ -131,7 +137,7 @@ function names.resolve(specification)
else
return specification.name..'.tfm', false
end
- elseif ofm then
+ elseif resolvers.find_file(specification.name, "ofm") then
if ext == 'ofm' then
return specification.name, false
else