summaryrefslogtreecommitdiff
path: root/tex/generic
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-01-07 13:28:56 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-01-07 13:28:56 +0100
commitbcc5f422cb282c78b890ae719ac1a63eaa5e62aa (patch)
tree15ad5b0443d5ddff315eeee7426952930879a507 /tex/generic
parentb04dda4c73d0f71e78f1fd4979ef04c7e9a669ed (diff)
downloadcontext-bcc5f422cb282c78b890ae719ac1a63eaa5e62aa.tar.gz
2019-01-07 10:16:00
Diffstat (limited to 'tex/generic')
-rw-r--r--tex/generic/context/luatex/luatex-basics-nod.lua86
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua127
2 files changed, 111 insertions, 102 deletions
diff --git a/tex/generic/context/luatex/luatex-basics-nod.lua b/tex/generic/context/luatex/luatex-basics-nod.lua
index 53414a009..4c9a13f9a 100644
--- a/tex/generic/context/luatex/luatex-basics-nod.lua
+++ b/tex/generic/context/luatex/luatex-basics-nod.lua
@@ -144,8 +144,6 @@ nodes.unset_attribute = node.unset_attribute
nodes.protect_glyphs = node.protect_glyphs
nodes.unprotect_glyphs = node.unprotect_glyphs
------.kerning = node.kerning
------.ligaturing = node.ligaturing
nodes.mlist_to_hlist = node.mlist_to_hlist
-- in generic code, at least for some time, we stay nodes, while in context
@@ -167,64 +165,74 @@ nodes.tonut = tonut
nuts.tonode = tonode
nuts.tonut = tonut
-local getfield = direct.getfield
-local setfield = direct.setfield
-
-nuts.getfield = getfield
-nuts.setfield = setfield
-nuts.getnext = direct.getnext
-nuts.setnext = direct.setnext
-nuts.getprev = direct.getprev
-nuts.setprev = direct.setprev
-nuts.getboth = direct.getboth
-nuts.setboth = direct.setboth
-nuts.getid = direct.getid
nuts.getattr = direct.get_attribute
-nuts.setattr = setfield
+nuts.getboth = direct.getboth
+nuts.getchar = direct.getchar
+nuts.getcomponents = direct.getcomponents
+----.getdepth = direct.getdepth
+----.getdir = direct.getdir
+nuts.getdirection = direct.getdirection
+nuts.getdisc = direct.getdisc
+nuts.getfield = direct.getfield
nuts.getfont = direct.getfont
-nuts.setfont = direct.setfont
+----.getheight = direct.getheight
+nuts.getid = direct.getid
+nuts.getkern = direct.getkern
+----.getleader = direct.getleader
+nuts.getlist = direct.getlist
+nuts.getnext = direct.getnext
+nuts.getoffsets = direct.getoffsets
+nuts.getprev = direct.getprev
nuts.getsubtype = direct.getsubtype
-nuts.setsubtype = direct.setsubtype
-nuts.getchar = direct.getchar
+nuts.getwidth = direct.getwidth
+nuts.setattr = direct.setfield
+nuts.setboth = direct.setboth
nuts.setchar = direct.setchar
-nuts.getdisc = direct.getdisc
+nuts.setcomponents = direct.setcomponents
+----.setdepth = direct.setdepth
+nuts.setdir = direct.setdir
+nuts.setdirection = direct.setdirection
nuts.setdisc = direct.setdisc
+nuts.setfield = setfield
+----.setfont = direct.setfont
+----.setheight = direct.setheight
+nuts.setkern = direct.setkern
+----.setleader = direct.setleader
nuts.setlink = direct.setlink
-nuts.setsplit = direct.setsplit
-nuts.getlist = direct.getlist
nuts.setlist = direct.setlist
-nuts.getoffsets = direct.getoffsets
+nuts.setnext = direct.setnext
nuts.setoffsets = direct.setoffsets
+nuts.setprev = direct.setprev
+nuts.setsplit = direct.setsplit
+nuts.setsubtype = direct.setsubtype
+nuts.setwidth = direct.setwidth
-nuts.ischar = direct.is_char
nuts.is_char = direct.is_char
-nuts.isglyph = direct.is_glyph
nuts.is_glyph = direct.is_glyph
+nuts.ischar = direct.is_char
+nuts.isglyph = direct.is_glyph
-nuts.insert_before = direct.insert_before
-nuts.insert_after = direct.insert_after
-nuts.delete = direct.delete
nuts.copy = direct.copy
-nuts.copy_node = direct.copy
nuts.copy_list = direct.copy_list
-nuts.tail = direct.tail
+nuts.copy_node = direct.copy
+nuts.delete = direct.delete
+nuts.end_of_math = direct.end_of_math
+nuts.flush = direct.flush
nuts.flush_list = direct.flush_list
nuts.flush_node = direct.flush_node
-nuts.flush = direct.flush
nuts.free = direct.free
-nuts.remove = direct.remove
+nuts.insert_after = direct.insert_after
+nuts.insert_before = direct.insert_before
nuts.is_node = direct.is_node
-nuts.end_of_math = direct.end_of_math
+nuts.kerning = direct.kerning
+nuts.ligaturing = direct.ligaturing
+nuts.new = direct.new
+nuts.remove = direct.remove
+nuts.tail = direct.tail
nuts.traverse = direct.traverse
-nuts.traverse_id = direct.traverse_id
nuts.traverse_char = direct.traverse_char
nuts.traverse_glyph = direct.traverse_glyph
-nuts.ligaturing = direct.ligaturing
-nuts.kerning = direct.kerning
-nuts.new = direct.new
-
-nuts.getprop = nuts.getattr
-nuts.setprop = nuts.setattr
+nuts.traverse_id = direct.traverse_id
-- properties as used in the (new) injector:
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index accb0810d..e2e8dc750 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 01/03/19 19:27:26
+-- merge date : 01/07/19 10:07:58
do -- begin closure to overcome local limits and interference
@@ -4824,60 +4824,64 @@ nodes.tonode=tonode
nodes.tonut=tonut
nuts.tonode=tonode
nuts.tonut=tonut
-local getfield=direct.getfield
-local setfield=direct.setfield
-nuts.getfield=getfield
-nuts.setfield=setfield
-nuts.getnext=direct.getnext
-nuts.setnext=direct.setnext
-nuts.getprev=direct.getprev
-nuts.setprev=direct.setprev
-nuts.getboth=direct.getboth
-nuts.setboth=direct.setboth
-nuts.getid=direct.getid
nuts.getattr=direct.get_attribute
-nuts.setattr=setfield
+nuts.getboth=direct.getboth
+nuts.getchar=direct.getchar
+nuts.getcomponents=direct.getcomponents
+nuts.getdirection=direct.getdirection
+nuts.getdisc=direct.getdisc
+nuts.getfield=direct.getfield
nuts.getfont=direct.getfont
-nuts.setfont=direct.setfont
+nuts.getid=direct.getid
+nuts.getkern=direct.getkern
+nuts.getlist=direct.getlist
+nuts.getnext=direct.getnext
+nuts.getoffsets=direct.getoffsets
+nuts.getprev=direct.getprev
nuts.getsubtype=direct.getsubtype
-nuts.setsubtype=direct.setsubtype
-nuts.getchar=direct.getchar
+nuts.getwidth=direct.getwidth
+nuts.setattr=direct.setfield
+nuts.setboth=direct.setboth
nuts.setchar=direct.setchar
-nuts.getdisc=direct.getdisc
+nuts.setcomponents=direct.setcomponents
+nuts.setdir=direct.setdir
+nuts.setdirection=direct.setdirection
nuts.setdisc=direct.setdisc
+nuts.setfield=setfield
+nuts.setkern=direct.setkern
nuts.setlink=direct.setlink
-nuts.setsplit=direct.setsplit
-nuts.getlist=direct.getlist
nuts.setlist=direct.setlist
-nuts.getoffsets=direct.getoffsets
+nuts.setnext=direct.setnext
nuts.setoffsets=direct.setoffsets
-nuts.ischar=direct.is_char
+nuts.setprev=direct.setprev
+nuts.setsplit=direct.setsplit
+nuts.setsubtype=direct.setsubtype
+nuts.setwidth=direct.setwidth
nuts.is_char=direct.is_char
-nuts.isglyph=direct.is_glyph
nuts.is_glyph=direct.is_glyph
-nuts.insert_before=direct.insert_before
-nuts.insert_after=direct.insert_after
-nuts.delete=direct.delete
+nuts.ischar=direct.is_char
+nuts.isglyph=direct.is_glyph
nuts.copy=direct.copy
-nuts.copy_node=direct.copy
nuts.copy_list=direct.copy_list
-nuts.tail=direct.tail
+nuts.copy_node=direct.copy
+nuts.delete=direct.delete
+nuts.end_of_math=direct.end_of_math
+nuts.flush=direct.flush
nuts.flush_list=direct.flush_list
nuts.flush_node=direct.flush_node
-nuts.flush=direct.flush
nuts.free=direct.free
-nuts.remove=direct.remove
+nuts.insert_after=direct.insert_after
+nuts.insert_before=direct.insert_before
nuts.is_node=direct.is_node
-nuts.end_of_math=direct.end_of_math
+nuts.kerning=direct.kerning
+nuts.ligaturing=direct.ligaturing
+nuts.new=direct.new
+nuts.remove=direct.remove
+nuts.tail=direct.tail
nuts.traverse=direct.traverse
-nuts.traverse_id=direct.traverse_id
nuts.traverse_char=direct.traverse_char
nuts.traverse_glyph=direct.traverse_glyph
-nuts.ligaturing=direct.ligaturing
-nuts.kerning=direct.kerning
-nuts.new=direct.new
-nuts.getprop=nuts.getattr
-nuts.setprop=nuts.setattr
+nuts.traverse_id=direct.traverse_id
local propertydata=direct.get_properties_table()
nodes.properties={ data=propertydata }
direct.set_properties_mode(true,true)
@@ -25082,7 +25086,6 @@ local getprev=nuts.getprev
local getprev=nuts.getprev
local getprop=nuts.getprop
local setprop=nuts.setprop
-local getfont=nuts.getfont
local getsubtype=nuts.getsubtype
local getchar=nuts.getchar
local ischar=nuts.is_char
@@ -25506,7 +25509,6 @@ local getattr=nuts.getattr
local setattr=nuts.setattr
local getprop=nuts.getprop
local setprop=nuts.setprop
-local getfont=nuts.getfont
local getsubtype=nuts.getsubtype
local setsubtype=nuts.setsubtype
local getchar=nuts.getchar
@@ -25516,7 +25518,6 @@ local setdisc=nuts.setdisc
local setlink=nuts.setlink
local getcomponents=nuts.getcomponents
local setcomponents=nuts.setcomponents
-local getdir=nuts.getdir
local getwidth=nuts.getwidth
local ischar=nuts.is_char
local isglyph=nuts.isglyph
@@ -28407,49 +28408,47 @@ local function k_run_multiple(sub,injection,last,font,attr,steps,nofsteps,datase
end
end
end
-local txtdirstate,pardirstate do
+local txtdirstate,pardirstate do
local getdirection=nuts.getdirection
local lefttoright=0
local righttoleft=1
txtdirstate=function(start,stack,top,rlparmode)
- local nxt=getnext(start)
local dir,pop=getdirection(start)
if pop then
if top==1 then
- return nxt,0,rlparmode
+ return 0,rlparmode
else
top=top-1
if stack[top]==righttoleft then
- return nxt,top,-1
+ return top,-1
else
- return nxt,top,1
+ return top,1
end
end
elseif dir==lefttoright then
top=top+1
stack[top]=lefttoright
- return nxt,top,1
+ return top,1
elseif dir==righttoleft then
top=top+1
stack[top]=righttoleft
- return nxt,top,-1
+ return top,-1
else
- return nxt,top,rlparmode
+ return top,rlparmode
end
end
pardirstate=function(start)
- local nxt=getnext(start)
local dir=getdirection(start)
if dir==lefttoright then
- return nxt,1,1
+ return 1,1
elseif dir==righttoleft then
- return nxt,-1,-1
+ return -1,-1
elseif dir=="TLT" then
- return nxt,1,1
+ return 1,1
elseif dir=="TRT" then
- return nxt,-1,-1
+ return -1,-1
else
- return nxt,0,0
+ return 0,0
end
end
end
@@ -28498,7 +28497,12 @@ do
if trace_steps then
checkstep(head)
end
- local initialrl=(direction==1 or direction=="TRT") and -1 or 0
+ local initialrl=0
+ if getid(head)==localpar_code and getsubtype(head)==0 then
+ initialrl=pardirstate(start)
+ elseif direction==1 or direction=="TRT" then
+ initialrl=-1
+ end
local datasets=otfdataset(tfmdata,font,attr)
local dirstack={ nil }
sweephead={}
@@ -28613,9 +28617,8 @@ do
elseif id==math_code then
start=getnext(end_of_math(start))
elseif id==dir_code then
- start,topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
- elseif id==localpar_code then
- start,rlparmode,rlmode=pardirstate(start)
+ topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
+ start=getnext(start)
else
start=getnext(start)
end
@@ -28684,9 +28687,8 @@ do
elseif id==math_code then
start=getnext(end_of_math(start))
elseif id==dir_code then
- start,topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
- elseif id==localpar_code then
- start,rlparmode,rlmode=pardirstate(start)
+ topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
+ start=getnext(start)
else
start=getnext(start)
end
@@ -28763,9 +28765,8 @@ do
elseif id==math_code then
start=getnext(end_of_math(start))
elseif id==dir_code then
- start,topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
- elseif id==localpar_code then
- start,rlparmode,rlmode=pardirstate(start)
+ topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
+ start=getnext(start)
else
start=getnext(start)
end