diff options
author | Marius <mariausol@gmail.com> | 2013-10-20 01:21:09 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-10-20 01:21:09 +0300 |
commit | b8ac6d7b7fdb16293c28034c349efd5b0b7b20b3 (patch) | |
tree | 0e9051dbe21b4e9cfc72fe594df5b0fe7bc511f3 /tex/context/base/typo-spa.lua | |
parent | 965214d981e6129b782c67adcaf3a81aedcb0bac (diff) | |
download | context-b8ac6d7b7fdb16293c28034c349efd5b0b7b20b3.tar.gz |
beta 2013.10.20 07:09
Diffstat (limited to 'tex/context/base/typo-spa.lua')
-rw-r--r-- | tex/context/base/typo-spa.lua | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/tex/context/base/typo-spa.lua b/tex/context/base/typo-spa.lua index 5eba22889..c3f50fe98 100644 --- a/tex/context/base/typo-spa.lua +++ b/tex/context/base/typo-spa.lua @@ -24,7 +24,7 @@ local fonthashes = fonts.hashes local fontdata = fonthashes.identifiers local quaddata = fonthashes.quads -local texattribute = tex.attribute +local texsetattribute = tex.setattribute local unsetvalue = attributes.unsetvalue local v_reset = interfaces.variables.reset @@ -66,7 +66,7 @@ end -- todo cache lastattr -local function process(namespace,attribute,head) +function spacings.handler(head) local done = false local start = head -- head is always begin of par (whatsit), so we have at least two prev nodes @@ -74,13 +74,13 @@ local function process(namespace,attribute,head) while start do local id = start.id if id == glyph_code then - local attr = start[attribute] + local attr = start[a_spacings] if attr and attr > 0 then local data = mapping[attr] if data then local char = start.char local map = data.characters[char] - start[attribute] = unsetvalue -- needed? + start[a_spacings] = unsetvalue -- needed? if map then local left = map.left local right = map.right @@ -209,19 +209,13 @@ function spacings.set(name) n = data.number or unsetvalue end end - texattribute[a_spacings] = n + texsetattribute(a_spacings,n) end function spacings.reset() - texattribute[a_spacings] = unsetvalue + texsetattribute(a_spacings,unsetvalue) end -spacings.handler = nodes.installattributehandler { - name = "spacing", - namespace = spacings, - processor = process, -} - -- interface commands.definecharacterspacing = spacings.define |