diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-02-17 10:31:56 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-02-17 10:31:56 +0100 |
commit | b14f992ef5f4e868c9959b174278c86516d60dbc (patch) | |
tree | 28587bb46c025ea7b0d27ba93f09c93dcf53c73a /tex/context/base/mkiv/typo-drp.lua | |
parent | 95a1799032dc61dbca4a11e495be34b4397c8fec (diff) | |
download | context-b14f992ef5f4e868c9959b174278c86516d60dbc.tar.gz |
2017-02-17 10:23:00
Diffstat (limited to 'tex/context/base/mkiv/typo-drp.lua')
-rw-r--r-- | tex/context/base/mkiv/typo-drp.lua | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/typo-drp.lua b/tex/context/base/mkiv/typo-drp.lua index 0683a3472..e27ad75f3 100644 --- a/tex/context/base/mkiv/typo-drp.lua +++ b/tex/context/base/mkiv/typo-drp.lua @@ -22,7 +22,10 @@ local initials = typesetters.paragraphs or { } typesetters.initials = initials or { } local nodes = nodes + local tasks = nodes.tasks +local enableaction = tasks.enableaction +local disableaction = tasks.disableaction local nuts = nodes.nuts local tonut = nuts.tonut @@ -42,8 +45,11 @@ local setattr = nuts.setattr local setlink = nuts.setlink local setprev = nuts.setprev local setnext = nuts.setnext +local setfont = nuts.setfont local setchar = nuts.setchar local setwhd = nuts.setwhd +local setkern = nuts.setkern +local setoffsets = nuts.setoffsets local hpack_nodes = nuts.hpack @@ -91,7 +97,7 @@ local settings = nil function initials.set(specification) settings = specification or { } settings.enabled = true - tasks.enableaction("processors","typesetters.initials.handler") + enableaction("processors","typesetters.initials.handler") if trace_initials then report_initials("enabling initials") end @@ -250,11 +256,11 @@ actions[v_default] = function(head,setting) while true do local id = getid(current) if id == kern_code then - setfield(current,"kern",0) + setkern(current,0) elseif id == glyph_code then local next = getnext(current) if font then - setfield(current,"font",font) + setfont(current,font) end if dynamic > 0 then setattr(current,0,dynamic) @@ -316,8 +322,7 @@ actions[v_default] = function(head,setting) -- local hoffset = width + hoffset + distance + (indent and parindent or 0) for current in traverse_id(glyph_code,first) do - setfield(current,"xoffset",- hoffset ) - setfield(current,"yoffset",- voffset) -- no longer - height here + setoffsets(current,-hoffset,-voffset) -- no longer - height here if current == last then break end @@ -366,7 +371,7 @@ function initials.handler(head) end if attr then -- here as we can process nested boxes first so we need to keep state - tasks.disableaction("processors","typesetters.initials.handler") + disableaction("processors","typesetters.initials.handler") -- texsetattribute(attribute,unsetvalue) local alternative = settings.alternative or v_default local action = actions[alternative] or actions[v_default] |