diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua | 170 |
1 files changed, 74 insertions, 96 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua index e22f170ef90..2b996829e4c 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/fontloader-basics-nod.lua @@ -70,87 +70,84 @@ nodes.nodecodes = nodecodes nodes.glyphcodes = glyphcodes nodes.disccodes = disccodes -local flush_node = node.flush_node -local remove_node = node.remove -local traverse_id = node.traverse_id - nodes.handlers.protectglyphs = node.protect_glyphs -- beware: nodes! nodes.handlers.unprotectglyphs = node.unprotect_glyphs -- beware: nodes! -function nodes.remove(head, current, free_too) - local t = current - head, current = remove_node(head,current) - if t then - if free_too then - flush_node(t) - t = nil - else - t.next, t.prev = nil, nil - end - end - return head, current, t -end - -function nodes.delete(head,current) - return nodes.remove(head,current,true) -end - -local getfield = node.getfield -local setfield = node.setfield - -nodes.getfield = getfield -nodes.setfield = setfield - -nodes.getattr = getfield -nodes.setattr = setfield - --- being lazy ... just copy a bunch ... not all needed in generic but we assume --- nodes to be kind of private anyway - -nodes.tostring = node.tostring or tostring -nodes.copy = node.copy -nodes.copy_node = node.copy -nodes.copy_list = node.copy_list -nodes.delete = node.delete -nodes.dimensions = node.dimensions -nodes.end_of_math = node.end_of_math -nodes.flush_list = node.flush_list -nodes.flush_node = node.flush_node -nodes.flush = node.flush_node -nodes.free = node.free -nodes.insert_after = node.insert_after -nodes.insert_before = node.insert_before -nodes.hpack = node.hpack -nodes.new = node.new -nodes.tail = node.tail -nodes.traverse = node.traverse -nodes.traverse_id = node.traverse_id -nodes.slide = node.slide -nodes.vpack = node.vpack - -nodes.first_glyph = node.first_glyph -nodes.has_glyph = node.has_glyph or node.first_glyph - -nodes.current_attr = node.current_attr -nodes.has_field = node.has_field -nodes.last_node = node.last_node -nodes.usedlist = node.usedlist -nodes.protrusion_skippable = node.protrusion_skippable -nodes.write = node.write - -nodes.has_attribute = node.has_attribute -nodes.set_attribute = node.set_attribute -nodes.unset_attribute = node.unset_attribute - -nodes.protect_glyphs = node.protect_glyphs -nodes.unprotect_glyphs = node.unprotect_glyphs -nodes.mlist_to_hlist = node.mlist_to_hlist +-- These are now gone in generic as they are context specific. + +-- local flush_node = node.flush_node +-- local remove_node = node.remove +-- local traverse_id = node.traverse_id +-- +-- function nodes.remove(head, current, free_too) +-- local t = current +-- head, current = remove_node(head,current) +-- if t then +-- if free_too then +-- flush_node(t) +-- t = nil +-- else +-- t.next, t.prev = nil, nil +-- end +-- end +-- return head, current, t +-- end +-- +-- function nodes.delete(head,current) +-- return nodes.remove(head,current,true) +-- end + +----- getfield = node.getfield +----- setfield = node.setfield + +-----.getfield = getfield +-----.setfield = setfield +-----.getattr = getfield +-----.setattr = setfield + +-----.tostring = node.tostring or tostring +-----.copy = node.copy +-----.copy_node = node.copy +-----.copy_list = node.copy_list +-----.delete = node.delete +-----.dimensions = node.dimensions +-----.end_of_math = node.end_of_math +-----.flush_list = node.flush_list +-----.flush_node = node.flush_node +-----.flush = node.flush_node +-----.free = node.free +-----.insert_after = node.insert_after +-----.insert_before = node.insert_before +-----.hpack = node.hpack +-----.new = node.new +-----.tail = node.tail +-----.traverse = node.traverse +-----.traverse_id = node.traverse_id +-----.slide = node.slide +-----.vpack = node.vpack + +-----.first_glyph = node.first_glyph +-----.has_glyph = node.has_glyph or node.first_glyph +-----.current_attr = node.current_attr +-----.has_field = node.has_field +-----.usedlist = node.usedlist +-----.protrusion_skippable = node.protrusion_skippable +-----.write = node.write + +-----.has_attribute = node.has_attribute +-----.set_attribute = node.set_attribute +-----.unset_attribute = node.unset_attribute + +-----.protect_glyphs = node.protect_glyphs +-----.unprotect_glyphs = node.unprotect_glyphs +-----.mlist_to_hlist = node.mlist_to_hlist -- in generic code, at least for some time, we stay nodes, while in context -- we can go nuts (e.g. experimental); this split permits us us keep code -- used elsewhere stable but at the same time play around in context --- much of this will go away +-- much of this will go away .. it's part of the context interface and not +-- officially in luatex-*.lua local direct = node.direct local nuts = { } @@ -190,7 +187,7 @@ nuts.setboth = direct.setboth nuts.setchar = direct.setchar nuts.setcomponents = direct.setcomponents ----.setdepth = direct.setdepth -nuts.setdir = direct.setdir +----.setdir = direct.setdir nuts.setdirection = direct.setdirection nuts.setdisc = direct.setdisc nuts.setfield = setfield @@ -207,8 +204,9 @@ nuts.setsplit = direct.setsplit nuts.setsubtype = direct.setsubtype nuts.setwidth = direct.setwidth -nuts.is_char = direct.is_char -nuts.is_glyph = direct.is_glyph +nuts.getglyphdata = nuts.getattr +nuts.setglyphdata = nuts.setattr + nuts.ischar = direct.is_char nuts.isglyph = direct.is_glyph @@ -234,26 +232,6 @@ nuts.traverse_char = direct.traverse_char nuts.traverse_glyph = direct.traverse_glyph nuts.traverse_id = direct.traverse_id --- for now - -if not nuts.getdirection then - - local getdir = direct.getdir - - function nuts.getdirection(n) - local d = getdir(n) - if d == "TLT" then return 0 - elseif d == "TRT" then return 1 - elseif d == "+TLT" then return 0, false - elseif d == "+TRT" then return 1, false - elseif d == "-TLT" then return 0, true - elseif d == "-TRT" then return 1, true - else return 0 - end - end - -end - -- properties as used in the (new) injector: local propertydata = direct.get_properties_table() |