fonts.enc.reencodings works with latex but not with context
I have now reencoded my first chess font. I'm now trying to find out how to setup things so that context users could also benefit from the reencoding. But the equivalent code of the code working with latex doesn't work in context \startluacode fonts.enc.reencodings["cfss-lsf-std"] = { --%bishop [66] = 8226, --%king [75] = 162, --% Knight [78] = 167, --%Queen [81] = 163, --%Rook [82] = 182, --%Pawn [112]= 223, } \stopluacode \font\alfonsouc="name:ChessAlfonso-X:mode=base:reencode=cfss-lsf-std" \starttext \alfonsouc \char75\char81\char82\char66\char78\char112 \stoptext I get the error "! LuaTeX error <main ctx instance>:15: attempt to index field 'reencodings' (a nil value)" It only works if I copy the code from font-dum.lua to the document. Isn't the code already loaded? Btw: There is a small typo in luat-dum.lua. Line 77 is missing an "s" found = kpse.find_file(name,"other text files") ^^^ missing. -- Ulrike Fischer
On 9-3-2011 5:34, Ulrike Fischer wrote:
I'm now trying to find out how to setup things so that context users could also benefit from the reencoding. But the equivalent code of the code working with latex doesn't work in context
this feature is indeed not part of context Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Am Thu, 10 Mar 2011 19:22:18 +0100 schrieb Hans Hagen:
I'm now trying to find out how to setup things so that context users could also benefit from the reencoding. But the equivalent code of the code working with latex doesn't work in context
this feature is indeed not part of context
Dormant code ;-). Well in case you want to include it, here a comment: The pros are: reencode is very easy to use. You only need to find out the numbers of the original chars. The cons are that is difficult to clean up the font. E.g. it seems impossible to get a font table which doesn't show also all the original chars (which are in positions not needed after the reencoding) with the reencode-method. You can't adjust kerns and not pull characters from other fonts. A "virtual lua font" (\font\mine=luatex-fonts-demo-vf-1-invf.lua) is much more powerful (and more fun) and works fine with context too, so I think I will use it the most time and document "reencode" for (LaTeX)-users who wants to install a chess font in a simple way. -- Ulrike Fischer
participants (2)
-
Hans Hagen
-
Ulrike Fischer