diff options
author | Marius <mariausol@gmail.com> | 2011-11-02 21:20:13 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-11-02 21:20:13 +0200 |
commit | 90e916b32378e7977b12866e008a073b07c25378 (patch) | |
tree | 18a79c67da7e83db4e351988eee0ca7f0a3bafe3 /tex/generic | |
parent | 84bef3a2d8fc0c5074bf0d179f811ad0219b70be (diff) | |
download | context-90e916b32378e7977b12866e008a073b07c25378.tar.gz |
beta 2011.11.02 20:10
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 56 |
1 files changed, 35 insertions, 21 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index ebd7cd239..4d5f40409 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 10/28/11 22:32:28 +-- merge date : 11/02/11 20:10:53 do -- begin closure to overcome local limits and interference @@ -3239,8 +3239,8 @@ constructors.keys = { noglyphnames = "boolean", mode = "string", has_math = "boolean", - no_math_italics = "boolean", - no_text_italics = "boolean", + mathitalics = "boolean", + textitalics = "boolean", finalized = "boolean", }, parameters = { @@ -3570,13 +3570,13 @@ function constructors.scale(tfmdata,specification) targetparameters.units = units targetparameters.scaledpoints = askedscaledpoints -- - local isvirtual = properties.virtualized or tfmdata.type == "virtual" - local hasquality = target.auto_expand or target.auto_protrude - local hasitalic = properties.italic_correction - local autoitalic = properties.auto_italic_correction - local stackmath = not properties.no_stackmath - local nonames = properties.noglyphnames - local nodemode = properties.mode == "node" + local isvirtual = properties.virtualized or tfmdata.type == "virtual" + local hasquality = target.auto_expand or target.auto_protrude + local hasitalic = properties.italic_correction + local autoitalic = properties.auto_italic_correction + local stackmath = not properties.no_stackmath + local nonames = properties.noglyphnames + local nodemode = properties.mode == "node" -- if changed and not next(changed) then changed = false @@ -3647,9 +3647,12 @@ function constructors.scale(tfmdata,specification) end -- local italickey = "italic" + -- + -- some context specific trickery (we might move this to a plug in into here + -- if hasmath then - if properties.no_mathitalics then - italickey = "italic_correction" -- context specific trickery + if properties.mathitalics then + italickey = "italic_correction" if trace_defining then report_defining("math italics disabled for: name '%s', fullname: '%s', filename: '%s'", name or "noname",fullname or "nofullname",filename or "nofilename") @@ -3657,15 +3660,20 @@ function constructors.scale(tfmdata,specification) end autoitalic = false -- new else - if properties.no_textitalics then - italickey = "italic_correction" -- context specific trickery + if properties.textitalics then + italickey = "italic_correction" if trace_defining then report_defining("text italics disabled for: name '%s', fullname: '%s', filename: '%s'", name or "noname",fullname or "nofullname",filename or "nofilename") end + if properties.delaytextitalics then + autoitalic = false + end end end -- + -- end of context specific trickery + -- local sharedkerns = { } -- -- we can have a dumb mode (basemode without math etc) that skips most @@ -3765,12 +3773,17 @@ function constructors.scale(tfmdata,specification) end -- if autoitalic then - local vi = description.italic or (description.boundingbox[3] - description.width + autoitalic) - if vi and vi ~= 0 then + local vi = description.italic + if not vi then + local vi = description.boundingbox[3] - description.width + autoitalic + if vi > 0 then -- < 0 indicates no overshoot or a very small auto italic + chr[italickey] = vi*hdelta + end + elseif vi ~= 0 then chr[italickey] = vi*hdelta end elseif hasitalic then - local vi = description.italic -- or character.italic hm, already scaled ! + local vi = description.italic if vi and vi ~= 0 then chr[italickey] = vi*hdelta end @@ -4287,7 +4300,7 @@ a helper function.</p> function constructors.checkedfeatures(what,features) local defaults = handlers[what].features.defaults if features and next(features) then - features = fastcopy(features) -- can be inherited + features = fastcopy(features) -- can be inherited (mt) but then no loops possible for key, value in next, defaults do if features[key] == nil then features[key] = value @@ -7106,9 +7119,9 @@ local function otftotfm(specification) tfmdata.shared = shared end shared.rawdata = rawdata - shared.features = features -- default + -- shared.features = features -- default shared.dynamics = { } - shared.processes = { } + -- shared.processes = { } tfmdata.changed = { } shared.features = features shared.processes = otf.setfeatures(tfmdata,features) @@ -7127,7 +7140,8 @@ local function read_from_otf(specification) tfmdata.properties.sub = specification.sub -- tfmdata = constructors.scale(tfmdata,specification) - constructors.applymanipulators("otf",tfmdata,specification.features.normal,trace_features,report_otf) + local allfeatures = tfmdata.shared.features or specification.features.normal + constructors.applymanipulators("otf",tfmdata,allfeatures,trace_features,report_otf) constructors.setname(tfmdata,specification) -- only otf? fonts.loggers.register(tfmdata,file.extname(specification.filename),specification) end |