\Udelcodenum doesn't work properly
Hello The XeTeX manual says that \Udelcodenum sets or return packet information about family/slot of the \Udelcode data. It seems that it doesn't work in LuaTeX: \chardef\lx="027E8 \Udelcode\lx=1 "027E8 \the\Udelcodenum\lx % prints 42893312, i.e. "28E8000 \Udelcodenum\lx=\Udelcodenum\lx \the\Udelcodenum\lx % prints -381681664 \bye The slot code "027E8 is mixed with 01 family and \Udelocodenum returns "28E8000. Of course, if I set new Udelcode data using \Udelcodenum\lx=\Udelcodenum\lx then I get totally bad result. On the other hand, XeTeX runing on the same testing file prints in both cases 1075849192, i.e "402027E8. The slot code "027E8 isn't mixed with the family number. Petr Olsak
On 11/18/2022 11:09 AM, Petr Olsak wrote:
Hello
The XeTeX manual says that \Udelcodenum sets or return packet information about family/slot of the \Udelcode data. It seems that it doesn't work in LuaTeX:
\chardef\lx="027E8 \Udelcode\lx=1 "027E8
\the\Udelcodenum\lx % prints 42893312, i.e. "28E8000
\Udelcodenum\lx=\Udelcodenum\lx \the\Udelcodenum\lx % prints -381681664 \bye
The slot code "027E8 is mixed with 01 family and \Udelocodenum returns "28E8000. Of course, if I set new Udelcode data using \Udelcodenum\lx=\Udelcodenum\lx then I get totally bad result.
On the other hand, XeTeX runing on the same testing file prints in both cases 1075849192, i.e "402027E8. The slot code "027E8 isn't mixed with the family number. fwiw, these num's are only meant for old fonts, as the source mentions:
/*tex This really only works for old-style delcodes! */ int get_del_code_num(int n) { delcodeval d = get_del_code(n); if (d.small_family_value < 0) { return -1; } else { return ((d.small_family_value * 256 + d.small_character_value) * 4096 + (d.large_family_value * 256) + d.large_character_value); } } delcodes are stores in a special way and as such the 'combined' numbers mean little (it could even change in the engine over time) ; in retrospect we should not have added these xetex commands because it's a different engine / implementation (also, opentype doesn't use both families) (in luametatex for a while we did have a roundtrip storage format but in the end i just kicked out these 'num' commands) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Petr Olsak