From fde411dd869e9b19c98ef73c38fea591a468262f Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 18 Dec 2009 11:12:00 +0100 Subject: beta 2009.12.18 11:12 --- tex/context/base/attr-ini.mkiv | 1 + tex/context/base/cont-new.tex | 2 +- tex/context/base/context.mkiv | 3 +-- tex/context/base/context.tex | 2 +- tex/context/base/data-res.lua | 13 +++++++----- tex/context/base/font-mis.lua | 2 +- tex/context/base/font-otf.lua | 31 ++++++++++++++++++++++++--- tex/context/base/lxml-tex.lua | 14 ++++++------ tex/context/base/math-dim.lua | 6 +++--- tex/context/base/s-fnt-25.tex | 2 +- tex/context/base/syst-ini.tex | 7 +++--- tex/generic/context/luatex-fonts-merged.lua | 33 +++++++++++++++++++++++++---- 12 files changed, 85 insertions(+), 31 deletions(-) (limited to 'tex') diff --git a/tex/context/base/attr-ini.mkiv b/tex/context/base/attr-ini.mkiv index b04282fb8..3d10086f0 100644 --- a/tex/context/base/attr-ini.mkiv +++ b/tex/context/base/attr-ini.mkiv @@ -51,6 +51,7 @@ \definesystemattribute[destination] \chardef\destinationattribute \dogetattributeid{destination} \definesystemattribute[graphicvadjust] \chardef\graphicvadjustattribute \dogetattributeid{graphicvadjust} \definesystemattribute[ruled] \chardef\ruledattribute \dogetattributeid{ruled} +\definesystemattribute[shifted] \chardef\shiftedattribute \dogetattributeid{shifted} % \definesystemattribute[ignore] % diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 40ca60100..218980a51 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2009.12.14 22:32} +\newcontextversion{2009.12.18 11:12} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 173e6a3d9..51f5d92d4 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,8 +20,7 @@ \loadcorefile{syst-ini} -% \ifnum\luatexversion<47 % also change message -\ifnum\luatexversion<46 % also change message +\ifnum\luatexversion<47 % also change message \writestatus{!!!!}{Your luatex binary is too old, you need at least version 0.47!} \expandafter\end \fi diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 55c87b5bb..4290fe723 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2009.12.14 22:32} +\edef\contextversion{2009.12.18 11:12} %D For those who want to use this: diff --git a/tex/context/base/data-res.lua b/tex/context/base/data-res.lua index d15046e80..c7f360141 100644 --- a/tex/context/base/data-res.lua +++ b/tex/context/base/data-res.lua @@ -384,7 +384,7 @@ end local function splitpathexpr(str, t, validate) -- no need for further optimization as it is only called a -- few times, we can use lpeg for the sub - if trace_expansion then + if trace_expansions then logs.report("fileio","expanding variable '%s'",str) end t = t or { } @@ -871,10 +871,13 @@ local function split_kpse_path(str) -- beware, this can be either a path or a {s local found = cache[str] if not found then str = gsub(str,"\\","/") - if find(str,";") then - found = checkedsplit(str,";") - else - found = checkedsplit(str,io.pathseparator) + local split = (find(str,";") and checkedsplit(str,";")) or checkedsplit(str,io.pathseparator) + found = { } + for i=1,#split do + local s = split[i] + if not find(s,"^{*unset}*") then + found[#found+1] = s + end end if trace_expansions then logs.report("fileio","splitting path specification '%s'",str) diff --git a/tex/context/base/font-mis.lua b/tex/context/base/font-mis.lua index 37a731735..5faeed2b7 100644 --- a/tex/context/base/font-mis.lua +++ b/tex/context/base/font-mis.lua @@ -11,7 +11,7 @@ local lower, strip = string.lower, string.strip fonts.otf = fonts.otf or { } -fonts.otf.version = fonts.otf.version or 2.636 +fonts.otf.version = fonts.otf.version or 2.640 fonts.otf.pack = true fonts.otf.cache = containers.define("fonts", "otf", fonts.otf.version, true) diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua index 6900b8445..2e9562190 100644 --- a/tex/context/base/font-otf.lua +++ b/tex/context/base/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.640 -- 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 diff --git a/tex/context/base/lxml-tex.lua b/tex/context/base/lxml-tex.lua index f5ff3b9c8..1f0a5d3d2 100644 --- a/tex/context/base/lxml-tex.lua +++ b/tex/context/base/lxml-tex.lua @@ -26,7 +26,7 @@ if not tex and not tex.sprint then end local texsprint, texprint, texwrite = tex.sprint, tex.print, tex.write -local texcatcodes, ctxcatcodes, vrbcatcodes = tex.texcatcodes, tex.ctxcatcodes, tex.vrbcatcodes +local texcatcodes, ctxcatcodes, vrbcatcodes, notcatcodes = tex.texcatcodes, tex.ctxcatcodes, tex.vrbcatcodes, tex.notcatcodes local xmlelements, xmlcollected, xmlsetproperty = xml.elements, xml.collected, xml.setproperty local xmlparseapply, xmlwithelements = xml.parse_apply, xml.withelements @@ -75,7 +75,7 @@ local entity = ampersand * lpeg.C((1-semicolon)^1) * semicolon local xmltextcapture = ( space^0 * newline^2 * lpeg.Cc("") / texprint + -- better ^-2 ? space^0 * newline * space^0 * lpeg.Cc(" ") / texsprint + - content / texsprint + -- current catcodes regime is notcatcodes + content / function(str) return texsprint(notcatcodes,str) end + -- was just texsprint, current catcodes regime is notcatcodes entity / xml.resolved_entity )^0 @@ -937,10 +937,10 @@ local function attribute(collected,a,default) local at = collected[1].at local str = (at and at[a]) or default if str and str ~= "" then - texsprint(ctxcatcodes,str) + texsprint(notcatcodes,str) end elseif default then - texsprint(ctxcatcodes,default) + texsprint(notcatcodes,default) end end @@ -952,7 +952,7 @@ local function chainattribute(collected,arguments) -- todo: optional levels if at then local a = at[arguments] if a then - texsprint(ctxcatcodes,a) + texsprint(notcatcodes,a) end else break -- error @@ -1188,10 +1188,10 @@ function lxml.att(id,a,default) local at = root.at local str = (at and at[a]) or default if str and str ~= "" then - texsprint(ctxcatcodes,str) + texsprint(notcatcodes,str) end elseif default then - texsprint(ctxcatcodes,default) + texsprint(notcatcodes,default) end end diff --git a/tex/context/base/math-dim.lua b/tex/context/base/math-dim.lua index 76d7a33dc..fda1e8551 100644 --- a/tex/context/base/math-dim.lua +++ b/tex/context/base/math-dim.lua @@ -248,7 +248,7 @@ function mathematics.dimensions(dimens) end t[variable] = tt end -logs.report("warning", "version 0.47 is needed for proper delimited math") +--~ logs.report("warning", "version 0.47 is needed for proper delimited math") local d = { AxisHeight = t . axis . text_style, AccentBaseHeight = t . accent_base_height . text_style, @@ -261,8 +261,8 @@ logs.report("warning", "version 0.47 is needed for proper delimited math") FractionNumeratorGapMin = t . fraction_num_vgap . text_style, FractionNumeratorShiftUp = t . fraction_num_up . text_style, FractionRuleThickness = t . fraction_rule . text_style, --- FractionDelimiterSize = t . fraction_del_size . text_style, --- FractionDelimiterDisplayStyleSize = t . fraction_del_size . display_style, + FractionDelimiterSize = t . fraction_del_size . text_style, + FractionDelimiterDisplayStyleSize = t . fraction_del_size . display_style, LowerLimitBaselineDropMin = t . limit_below_bgap . text_style, LowerLimitGapMin = t . limit_below_vgap . text_style, OverbarExtraAscender = t . overbar_kern . text_style, diff --git a/tex/context/base/s-fnt-25.tex b/tex/context/base/s-fnt-25.tex index 7142ee876..abaaaa06e 100644 --- a/tex/context/base/s-fnt-25.tex +++ b/tex/context/base/s-fnt-25.tex @@ -147,7 +147,7 @@ end \endinput -\startbuffer mathtest +\startbuffer[mathtest] \begingroup\mm\mr\showmathfontcharacters\endgroup \stopbuffer diff --git a/tex/context/base/syst-ini.tex b/tex/context/base/syst-ini.tex index 51e78e67b..aea29df5d 100644 --- a/tex/context/base/syst-ini.tex +++ b/tex/context/base/syst-ini.tex @@ -800,9 +800,10 @@ \pdfminorversion \plusfive - \ifdefined\pdfcompresslevel \else \newcount\pdfcompresslevel \fi - \ifdefined\pdfobjcompresslevel \else \newcount\pdfobjcompresslevel \fi - \ifdefined\pdfgentounicode \else \newcount\pdfgentounicode \fi \pdfgentounicode\plusone + \ifdefined\pdfcompresslevel \else \newcount\pdfcompresslevel \fi + \ifdefined\pdfobjcompresslevel \else \newcount\pdfobjcompresslevel \fi + \ifdefined\pdfgentounicode \else \newcount\pdfgentounicode \fi \pdfgentounicode \plusone + \ifdefined\pdfinclusioncopyfonts\else \newcount\pdfinclusioncopyfonts \fi \pdfinclusioncopyfonts\plusone \def\nopdfcompression {\pdfobjcompresslevel\zerocount \pdfcompresslevel\zerocount} \def\maximumpdfcompression{\pdfobjcompresslevel\plusnine \pdfcompresslevel\plusnine } diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index b21e5a2d9..959033e31 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 12/14/09 22:36:17 +-- merge date : 12/18/09 11:16:33 do -- begin closure to overcome local limits and interference @@ -5349,7 +5349,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.640 -- beware: also sync font-mis.lua otf.pack = true -- beware: also sync font-mis.lua otf.syncspace = true otf.notdef = false @@ -5480,6 +5480,7 @@ local enhancers = { "share widths", "strip not needed data", "migrate metadata", + "check math parameters", } function otf.load(filename,format,sub,featurefile) @@ -5504,8 +5505,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 @@ -6432,6 +6437,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 -- cgit v1.2.3