diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-04-02 20:46:19 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-04-02 20:46:19 +0200 |
commit | e32f57c9c5968f0c09130f6e24e28a96d6e1393d (patch) | |
tree | 476d22407b719a74b18a849d83fb8464f9a042c4 /tex/context/base/mkiv/node-fnt.lua | |
parent | 30ea6ac75b1cf62ea8e17228c07d54824285acfa (diff) | |
download | context-e32f57c9c5968f0c09130f6e24e28a96d6e1393d.tar.gz |
2017-04-02 19:57:00
Diffstat (limited to 'tex/context/base/mkiv/node-fnt.lua')
-rw-r--r-- | tex/context/base/mkiv/node-fnt.lua | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/node-fnt.lua b/tex/context/base/mkiv/node-fnt.lua index 3dc99e5f2..8aa088f88 100644 --- a/tex/context/base/mkiv/node-fnt.lua +++ b/tex/context/base/mkiv/node-fnt.lua @@ -139,7 +139,12 @@ fonts.hashes.processes = fontprocesses local ligaturing = nuts.ligaturing local kerning = nuts.kerning -local expanders +-- -- -- this will go away + +local disccodes = nodes.disccodes +local explicit_code = disccodes.explicit +local automatic_code = disccodes.automatic +local expanders = nil function fonts.setdiscexpansion(v) if v == nil or v == true then @@ -157,6 +162,8 @@ end fonts.setdiscexpansion(true) +-- -- -- till here + local function start_trace(head) run = run + 1 report_fonts() @@ -358,9 +365,10 @@ function handlers.characters(head,groupcode,size,packtype,direction) -- basefont is not supported in disc only runs ... it would mean a lot of -- ranges .. we could try to run basemode as a separate processor run but -- not for now (we can consider it when the new node code is tested - for d in traverse_id(disc_code,nuthead) do - -- we could use first_glyph, only doing replace is good enough + -- we could use first_glyph, only doing replace is good enough because + -- pre and post are normally used for hyphens and these come from fonts + -- that part of the hyphenated word local _, _, r = getdisc(d) if r then local prevfont = nil @@ -407,9 +415,7 @@ function handlers.characters(head,groupcode,size,packtype,direction) end elseif expanders then local subtype = getsubtype(d) - if subtype == discretionary_code then - -- already done when replace - else + if subtype == automatic_code or subtype == explicit_code then expanders[subtype](d) e = e + 1 end |