From d4cccf105bb508150dc765c93bb47bf6f9a87f81 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 29 Dec 2009 15:50:46 +0200 Subject: Updating to latest ConTeXt beta (2009.12.26) --- otfl-font-otf.lua | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'otfl-font-otf.lua') diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua index 6900b84..e2f0f5b 100644 --- a/otfl-font-otf.lua +++ b/otfl-font-otf.lua @@ -83,7 +83,7 @@ otf.features.default = otf.features.default or { } otf.enhancers = otf.enhancers or { } otf.glists = { "gsub", "gpos" } -otf.version = 2.636 -- beware: also sync font-mis.lua +otf.version = 2.641 -- beware: also sync font-mis.lua otf.pack = true -- beware: also sync font-mis.lua otf.syncspace = true otf.notdef = false @@ -214,6 +214,7 @@ local enhancers = { "share widths", "strip not needed data", "migrate metadata", + "check math parameters", } function otf.load(filename,format,sub,featurefile) @@ -238,8 +239,12 @@ function otf.load(filename,format,sub,featurefile) ff, messages = fontloader.open(filename) end if trace_loading and messages and #messages > 0 then - for m=1,#messages do - logs.report("load otf","warning: %s",messages[m]) + if type(messages) == "string" then + logs.report("load otf","warning: %s",messages) + else + for m=1,#messages do + logs.report("load otf","warning: %s",tostring(messages[m])) + end end end if ff then @@ -1166,6 +1171,26 @@ otf.enhancers["migrate metadata"] = function(data,filename) metadata.charwidth = pfminfo and pfminfo.avgwidth end +local private_math_parameters = { + "FractionDelimiterSize", + "FractionDelimiterDisplayStyleSize", +} + +otf.enhancers["check math parameters"] = function(data,filename) + local mathdata = data.metadata.math + if mathdata then + for m=1,#private_math_parameters do + local pmp = private_math_parameters[m] + if not mathdata[pmp] then + if trace_loading then + logs.report("load otf", "setting math parameter '%s' to 0", pmp) + end + mathdata[pmp] = 0 + end + end + end +end + otf.enhancers["flatten glyph lookups"] = function(data,filename) for k, v in next, data.glyphs do if v.lookups then @@ -1505,8 +1530,6 @@ function otf.copy_to_tfm(data,cache_id) -- we can save a copy when we reorder th tfm.cidinfo = data.cidinfo tfm.cidinfo.registry = tfm.cidinfo.registry or "" tfm.type = "real" - tfm.stretch = 0 -- stretch - tfm.slant = 0 -- slant tfm.direction = 0 tfm.boundarychar_label = 0 tfm.boundarychar = 65536 -- cgit v1.2.3