From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/5351 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Still don't understand how to switch fonts in the new context Date: Wed, 22 Aug 2001 14:06:35 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20010822122917.034c0478@server-1> References: <3B8234C9.B95ACC9B@ukrpost.net> <5.1.0.14.1.20010821153743.0208da68@server-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035395944 873 80.91.224.250 (23 Oct 2002 17:59:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:59:04 +0000 (UTC) Cc: ConTeXt mailing list Original-To: Olya Briginets In-Reply-To: <3B82BD8D.C61F51D@ukrpost.net> Xref: main.gmane.org gmane.comp.tex.context:5351 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:5351 Hi, I have problem specifying font encoding: it works only until font switching >command. I write (the example from Willi Egger): > > \setupencoding[default=ec] > \setupbodyfont[pos,ber] > \enableencoding[ec] > \enableregime[windows] > > \starttext > > \Adiaeresis Ä\"Argerlicher Fall. ..... >And after any font switching command, even \tf, accents go wrong -- id est >those >defined via \defineaccent (those that are input verbatim like ä are OK). If I >put \enableencoding[ec] after font switching command, accents are fixed, but >surely I'm not supposed to put \enableencoding[ec] after each font switch. > >What have I missed? How to set up encoding globally? (\setupbodyfont does not >seem to accept encoding as argument.) You only have to \enable encoding if there is a real reason for it. Normally the encoding is switched with the font. So, it looks like a misconfiguration. You can add the following code to cont-new.tex (assuming you use pdfetex) \unprotect \def\tracedfontencoding#1% {\ifcsname\??ff#1\s!encoding\endcsname \space[\csname\??ff#1\s!encoding\endcsname]% \fi} \def\tracedfontname#1% {\ifcsname\??ff\fontclass#1\endcsname #1\tracedfontencoding{\fontclass#1}\space->\space \@EA\tracedfontname\csname\??ff\fontclass#1\endcsname \else\ifcsname\??ff#1\endcsname #1\tracedfontencoding{#1}\space->\space \@EA\tracedfontname\csname\??ff#1\endcsname \else #1% \fi\fi} \protect You can now say something like \message{\tracedfontname{Serif}} and see what font name is actually used and where in the chain the encoding is set. The last name in the row should be defined in a map file and mapped onto a real filename. Either this map file is loaded runtime, or the entry should be in your local pdftex map file. Now, if there is no [ec] in this chain, you're not using ec, which means some error in the setup. Once you've sorted out what you want / need, we can add some entries to typescripts useful for your language Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------