ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* fonts.enc.reencodings works with latex but not with context
@ 2011-03-09 16:34 Ulrike Fischer
  2011-03-10 18:22 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Ulrike Fischer @ 2011-03-09 16:34 UTC (permalink / raw)
  To: ntg-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 

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: fonts.enc.reencodings works with latex but not with context
  2011-03-09 16:34 fonts.enc.reencodings works with latex but not with context Ulrike Fischer
@ 2011-03-10 18:22 ` Hans Hagen
  2011-03-11 12:38   ` Ulrike Fischer
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2011-03-10 18:22 UTC (permalink / raw)
  To: news3, mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re:  fonts.enc.reencodings works with latex but not with context
  2011-03-10 18:22 ` Hans Hagen
@ 2011-03-11 12:38   ` Ulrike Fischer
  0 siblings, 0 replies; 3+ messages in thread
From: Ulrike Fischer @ 2011-03-11 12:38 UTC (permalink / raw)
  To: ntg-context

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 

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-11 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09 16:34 fonts.enc.reencodings works with latex but not with context Ulrike Fischer
2011-03-10 18:22 ` Hans Hagen
2011-03-11 12:38   ` Ulrike Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).