summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkiv/s-languages-hyphenation.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-05-14 19:58:50 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-05-14 19:58:50 +0200
commitfd0c4577a4b6e85ca2db664906e1a03807ce133f (patch)
treefa23fcc04248d03ff82e34634b8ef1bb9cf28acb /tex/context/modules/mkiv/s-languages-hyphenation.lua
parentdb581096187dc2d3cbdbe4cdc39d247c168b1607 (diff)
downloadcontext-fd0c4577a4b6e85ca2db664906e1a03807ce133f.tar.gz
2017-05-14 19:15:00
Diffstat (limited to 'tex/context/modules/mkiv/s-languages-hyphenation.lua')
-rw-r--r--tex/context/modules/mkiv/s-languages-hyphenation.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/tex/context/modules/mkiv/s-languages-hyphenation.lua b/tex/context/modules/mkiv/s-languages-hyphenation.lua
index 971ca3d8f..6d3cf3d3e 100644
--- a/tex/context/modules/mkiv/s-languages-hyphenation.lua
+++ b/tex/context/modules/mkiv/s-languages-hyphenation.lua
@@ -39,6 +39,8 @@ local getdisc = nuts.getdisc
local getattr = nuts.getattr
local getfont = nuts.getfont
local getfield = nuts.getfield
+local getlang = nuts.getlang
+local setlang = nuts.setlang
local setlink = nuts.setlink
local setdisc = nuts.setdisc
local setfield = nuts.setfield
@@ -129,7 +131,7 @@ local function getlanguage(head,l,left,right)
local t = { }
for n in traverse_by_id(glyph_code,tonut(head)) do
t[n] = {
- getfield(n,"lang"),
+ getlang(n),
getfield(n,"left"),
getfield(n,"right"),
}
@@ -148,7 +150,7 @@ function moduledata.languages.hyphenation.showhyphens(head)
-- somehow assigning -1 fails
for n in traverse_by_id(glyph_code,tonut(head)) do
cached[n] = {
- getfield(n,"lang"),
+ getlang(n),
getfield(n,"left"),
getfield(n,"right")
}
@@ -161,7 +163,7 @@ function moduledata.languages.hyphenation.showhyphens(head)
local lmin = s.lefthyphenmin
local rmin = s.righthyphenmin
for n in next, cached do
- setfield(n,"lang",l)
+ setlang(n,l)
setfield(n,"left",lmin)
setfield(n,"right",rmin)
end
@@ -173,7 +175,7 @@ function moduledata.languages.hyphenation.showhyphens(head)
mark(head,marked[i],1/16,l/2,l/4,"hyphenation:"..(colorbytag and tags[i] or i))
end
for n, d in next, cached do
- setfield(n,"lang",d[1])
+ setlang(n,d[1])
setfield(n,"left",d[2])
setfield(n,"right",d[3])
end