[NTG-context] readposition() in mkiv font-dsp.lua
nomosnomos at gmail.com
Fri May 17 15:01:16 CEST 2019
I am using luaotfload.sty in TexLive 2019, that is latex.
On my mac, everything is flawlessly working.
But I've heard from somebody that NotoSansCJKkr-Regular etc fonts
are not usable on Windows machine; so I tested on 32-bit Windows 10
virtual machine with small memory (2GB) and it was really unusable.
I did some digging into the source code of luaotfload package.
Now I have a guess that readposition() in font-dsp.lua might be the culprit.
For instance, when format == 0x04 and the result of readshort(f) == 0,
then the return value of the function is currently "true".
After it has been changed to "false", NotoSansCJKkr fonts are working
quite well on 32-bit Windows.
With the same changes of readposition() on my 64-bit Mac,
the elapsed time for making cache file of NotoSansCJK fonts has been
dramatically reduced: from 25 seconds to 10 seconds. And the resulting
cache file is perfectly the same as before.
So I would like to suggest those return values to be changed to "false".
Certainly, I do not know much about opentype spec, so I might be wrong and
there could be good reasons for current code state.
Seoul, Republic of Korea
More information about the ntg-context