I see that part of my problem was creating glyph nodes with subtype 0 and I
should use subtype 1 instead.
But to be clear, these are the cases I found surprising:
local a = node.new('glyph', 0)
node.protect_glyph(a)
node.protect_glyph(a)
print(a.subtype) -- expected 256, actual 512
node.unprotect_glyph(a)
node.unprotect_glyph(a)
print(a.subtype) -- expected 0, actual 256
local b = node.new('disc')
local c = node.new('glyph', 'character')
b.replace = c
node.unprotect_glyph(b)
print(c.subtype) -- expected 1, actual 65281
The second case (expected 0, actual 256) is explained by what you wrote:
we make an exception for 256 which can be used when
> no subtype is set which makes it possible to disable unprotection.
>
But the first case still seems surprising to me, and the third case really
looks like a bug to me.
Thank you!
_______________________________________________
dev-luatex mailing list -- [email protected]
To unsubscribe send an email to [email protected]