diff options
Diffstat (limited to 'tex/context/base/font-def.lua')
-rw-r--r-- | tex/context/base/font-def.lua | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua index eca631184..c4b72194c 100644 --- a/tex/context/base/font-def.lua +++ b/tex/context/base/font-def.lua @@ -328,22 +328,18 @@ evolved. Each one has its own way of dealing with its format.</p> --ldx]]-- local function check_tfm(specification,fullname) - -- ofm directive blocks local path search unless set - fullname = resolvers.findbinfile(fullname, 'tfm') or "" -- just to be sure - if fullname ~= "" then - specification.filename, specification.format = fullname, "ofm" + -- ofm directive blocks local path search unless set; btw, in context we + -- don't support ofm files anyway as this format is obsolete + local foundname = resolvers.findbinfile(fullname, 'tfm') or "" -- just to be sure + if foundname == "" then + foundname = resolvers.findbinfile(fullname, 'ofm') or "" -- bonus for usage outside context + end + if foundname ~= "" then + specification.filename, specification.format = foundname, "ofm" return tfm.read_from_tfm(specification) end end ---~ local function check_afm(specification,fullname) ---~ fullname = resolvers.findbinfile(fullname, 'afm') or "" -- just to be sure ---~ if fullname ~= "" then ---~ specification.filename, specification.format = fullname, "afm" ---~ return tfm.read_from_afm(specification) ---~ end ---~ end - local function check_afm(specification,fullname) local foundname = resolvers.findbinfile(fullname, 'afm') or "" -- just to be sure if foundname == "" and tfm.auto_afm then |