summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/scrp-ini.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-09-02 00:04:51 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2018-09-02 00:04:51 +0200
commitfd9c4ecd4421d087de21bef1e53d8ffb016285b0 (patch)
tree64606204adcabe2f197984ca8d063891b770bace /tex/context/base/mkiv/scrp-ini.lua
parent2106beefbc854f77a92264c815d3cf2b3460f0b6 (diff)
downloadcontext-fd9c4ecd4421d087de21bef1e53d8ffb016285b0.tar.gz
2018-09-01 23:20:00
Diffstat (limited to 'tex/context/base/mkiv/scrp-ini.lua')
-rw-r--r--tex/context/base/mkiv/scrp-ini.lua51
1 files changed, 1 insertions, 50 deletions
diff --git a/tex/context/base/mkiv/scrp-ini.lua b/tex/context/base/mkiv/scrp-ini.lua
index cc74df16b..8c493650b 100644
--- a/tex/context/base/mkiv/scrp-ini.lua
+++ b/tex/context/base/mkiv/scrp-ini.lua
@@ -889,15 +889,13 @@ setmetatableindex(cache_nop,function(t,k) local v = { } t[k] = v return v end)
-- playing nice
function autofontfeature.handler(head)
- for n in nextchar, head do
+ for n, font, char in nextchar, head do
-- if getattr(n,a_scriptinjection) then
-- -- already tagged by script feature, maybe some day adapt
-- else
- local char = getchar(n)
local script = otfscripts[char]
if script then
local dynamic = getattr(n,0) or 0
- local font = getfont(n)
if dynamic > 0 then
local slot = cache_yes[font]
local attr = slot[script]
@@ -933,53 +931,6 @@ function autofontfeature.handler(head)
return head
end
-if LUATEXVERSION >= 1.080 then
-
- function autofontfeature.handler(head)
- for n, font, char in nextchar, head do
- -- if getattr(n,a_scriptinjection) then
- -- -- already tagged by script feature, maybe some day adapt
- -- else
- local script = otfscripts[char]
- if script then
- local dynamic = getattr(n,0) or 0
- if dynamic > 0 then
- local slot = cache_yes[font]
- local attr = slot[script]
- if not attr then
- attr = mergecontext(dynamic,name,2)
- slot[script] = attr
- if trace_scripts then
- report_scripts("script: %s, trigger %C, dynamic: %a, variant: %a",script,char,attr,"extended")
- end
- end
- if attr ~= 0 then
- n[0] = attr
- -- maybe set scriptinjection when associated
- end
- else
- local slot = cache_nop[font]
- local attr = slot[script]
- if not attr then
- attr = registercontext(font,script,2)
- slot[script] = attr
- if trace_scripts then
- report_scripts("script: %s, trigger %C, dynamic: %s, variant: %a",script,char,attr,"normal")
- end
- end
- if attr ~= 0 then
- setattr(n,0,attr)
- -- maybe set scriptinjection when associated
- end
- end
- end
- -- end
- end
- return head
- end
-
-end
-
function autofontfeature.enable()
report_scripts("globally enabled")
enableaction("processors","scripts.autofontfeature.handler")