diff options
author | Elie Roux <elie.roux@telecom-bretagne.eu> | 2009-08-10 08:54:22 +0300 |
---|---|---|
committer | Elie Roux <elie.roux@telecom-bretagne.eu> | 2009-08-10 08:54:22 +0300 |
commit | e7e1f9fa9046828a20677ac09a230eb383854c93 (patch) | |
tree | 9539e3bb3f59e690d2f1d70c8053fde76b5c52df /otfl-font-def.lua | |
parent | a4ad0bc15c4d506ba81f1e95431cf225ab094274 (diff) | |
download | luaotfload-e7e1f9fa9046828a20677ac09a230eb383854c93.tar.gz |
updating to latest (20090809) ConTeXt code (with minor bugfix)
Diffstat (limited to 'otfl-font-def.lua')
-rw-r--r-- | otfl-font-def.lua | 27 |
1 files changed, 12 insertions, 15 deletions
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.</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 @@ -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-- <p>We need to check for default features. For this we provide |