From e7e1f9fa9046828a20677ac09a230eb383854c93 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Mon, 10 Aug 2009 08:54:22 +0300 Subject: updating to latest (20090809) ConTeXt code (with minor bugfix) --- otfl-font-def.lua | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'otfl-font-def.lua') diff --git a/otfl-font-def.lua b/otfl-font-def.lua index eca6311..3301c39 100644 --- a/otfl-font-def.lua +++ b/otfl-font-def.lua @@ -328,22 +328,18 @@ evolved. Each one has its own way of dealing with its format.

--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 @@ -440,9 +436,10 @@ function readers.opentype(specification,suffix,what) end end -function readers.otf(specification) return readers.opentype(specification,"otf","opentype") end -function readers.ttf(specification) return readers.opentype(specification,"ttf","truetype") end -function readers.ttc(specification) return readers.opentype(specification,"ttf","truetype") end -- !! +function readers.otf (specification) return readers.opentype(specification,"otf","opentype") end +function readers.ttf (specification) return readers.opentype(specification,"ttf","truetype") end +function readers.ttc (specification) return readers.opentype(specification,"ttf","truetype") end -- !! +function readers.dfont(specification) return readers.opentype(specification,"ttf","truetype") end -- !! --[[ldx--

We need to check for default features. For this we provide -- cgit v1.2.3