From 288c14652b8c569db532d034646a705a7a42b7c2 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Wed, 19 May 2010 22:16:53 +0300 Subject: 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. --- otfl-font-nms.lua | 10 ++++++++-- 1 file 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 -- cgit v1.2.3