Side effect of virtual fonts
I made two copies of luatex-fonts-demo-vf-1.lua named vf-a.lua and vf-b.lua (The original file can be found in \context-minimals\context\tex\texmf-context\tex\generic\context). In both copies I changed the three fonts the virtual font uses as basis to "Arial". In vf-b.lua I added after the for-loop which manipulates the caracters this code: f1.characters[98].width=3000000 f2.characters[98].width=3000000 f3.characters[98].width=3000000 f1.characters[97]= nil f2.characters[97]= nil f3.characters[97]= nil It has the expected effect when I use vf-b: It enlarges the width of the "b" and removes the "a" from the font. But it not only affect the vf-b-font, it also affects vf-a: If I load vf-a *after* vf-b, it also loose the "a" and the width of "b" is changed. In a older version of context, where the lua used "fonts.tfm.readanddefine" instead of the new "fonts.constructors.readanddefine" I got an side effect too, but only on the "a". My questions are 1. Why do I get the side effect only when f1, f2 and f3 call the same font? Chance (because of the math random) or something else? 2. How can I make a virtual lua-font which is free of such side effects? 3. I got errors when I tried to use the old version of the virtual font with the newest context. Is "fonts.tfm.readanddefine" now deprecated? -- Ulrike Fischer
participants (1)
-
Ulrike Fischer