[fontloader] cached fonts have invalid tounicode values
Hi Hans, this has been reported by Dohyun Kim [1]: the generic fontloader (not Context) serializes some tounicode values as Lua numbers, not strings. When re-reading the cache file the values lose all leading zeros, so they are no longer well-formed UTF-16BE. ... ["tounicode"]={ [2329]="E001", ... [2384]="0063006B", -- <-- correct [2385]=00630068, -- <-- invalid [2386]=00740074, [2387]=00630074, [2388]="017F0069", ... Best regards, Philipp [1] https://github.com/lualatex/luaotfload/issues/102 (Kim’s example works with luatex-plain if you comment out the ``\input luaotfload.sty`` line.) -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments
···
Hi Hans,
this has been reported by Dohyun Kim [1]: the generic fontloader (not Context) serializes some tounicode values as Lua numbers, not strings. When re-reading the cache file the values lose all leading zeros, so they are no longer well-formed UTF-16BE.
... ["tounicode"]={ [2329]="E001", ... [2384]="0063006B", -- <-- correct [2385]=00630068, -- <-- invalid [2386]=00740074, [2387]=00630074, [2388]="017F0069", ...
Best regards, Philipp
[1] https://github.com/lualatex/luaotfload/issues/102 (Kim’s example works with luatex-plain if you comment out the ``\input luaotfload.sty`` line.)
I’ve traced it to luatex-basics-gen.lua. The cache is compiled with the spec “{reduce = true}” which causes values to be analyzed and “tonumber()”ed. If I unset the reduce flag, the values turn out correct in the PDF. Best, Philipp
participants (1)
-
Philipp Gesang