From 8c9101fcc313f47232c8378a1cde37874efd845a Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Tue, 5 Jul 2016 08:17:49 +0200 Subject: [fontloader] sync with Context as of 2016-07-05 --- src/fontloader/misc/fontloader-font-one.lua | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/fontloader/misc/fontloader-font-one.lua') diff --git a/src/fontloader/misc/fontloader-font-one.lua b/src/fontloader/misc/fontloader-font-one.lua index a6f47e8..8629850 100644 --- a/src/fontloader/misc/fontloader-font-one.lua +++ b/src/fontloader/misc/fontloader-font-one.lua @@ -86,7 +86,8 @@ local steps = { "add ligatures", "add extra kerns", "normalize features", - "fix names", + "check extra features", + "fix names", -- what a hack ... -- "add tounicode data", } @@ -318,6 +319,8 @@ enhancers["normalize features"] = function(data) data.resources.sequences = sequences end +enhancers["check extra features"] = otf.enhancers.enhance + enhancers["fix names"] = function(data) for k, v in next, data.descriptions do local n = v.name @@ -752,18 +755,12 @@ end

We have the usual two modes and related features initializers and processors.

--ldx]]-- -local function setmode(tfmdata,value) - if value then - tfmdata.properties.mode = lower(value) - end -end - registerafmfeature { name = "mode", description = "mode", initializers = { - base = setmode, - node = setmode, + base = otf.modeinitializer, + node = otf.modeinitializer, } } @@ -782,8 +779,6 @@ registerafmfeature { -- readers -local check_tfm = readers.check_tfm - fonts.formats.afm = "type1" fonts.formats.pfb = "type1" @@ -820,7 +815,8 @@ function readers.afm(specification,method) tfmdata = check_afm(specification,specification.name .. "." .. forced) end if not tfmdata then - method = method or definers.method or "afm or tfm" + local check_tfm = readers.check_tfm + method = (check_tfm and (method or definers.method or "afm or tfm")) or "afm" if method == "tfm" then tfmdata = check_tfm(specification,specification.name) elseif method == "afm" then -- cgit v1.2.3