Re: [NTG-context] How to switch between fonts?

2005-03-18 Thread Hans Hagen
Stefan Wachter wrote:
1. A particual problem in this situation
Is it possible to define font synonymes locally (i.e. inside a group)? 
In that case I could map the virtual fonts that are base on 8a encoded 
raw fonts into virtual fonts that are based on texnansi reencoded raw 
fonts.

I tried that but it seems that font synonymes are accepted only at the 
beginning.
not true; what you observe is that font defs are frozen; an option is to define 
multiple typeface collections, since these store information; so,

\definetypeface[timesa][rm][serif][times][default[encoding=texnansi]
\definetypeface[timesb][rm][serif][times][default[encoding=ec]
now you can use both intermixed
The switch must respect the current font characteristics (i.e. \ss, \rm, 
\tt, \bf, \it, \bi, and size).
\timesa \bf test \pushcurrentfont \timesb \popcurrentfont test
alternatively you can define symbols for those special chars, see symb-*.tex; 
\getglyph is also an option; this one follows the style

Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] How to switch between fonts?

2005-03-16 Thread Stefan Wachter
Dear font experts!
For some weeks I try very hard to generate minimal PDF documents using 
the PDF base 14 fonts. Now the following problem popped up:

The Helvitica, Times, and Courier fonts have 8a as their default 
encoding. Unfortunately, the 8a encoding is somewhat incomplete because 
it misses some characters (eg. the degree character). In TeX I use 
texnansi encoding because it offers most of the special characters that 
I need.

If I use 8a encoding for the PDF document (in order to avoid reencoding) 
then the degree symbol is typeset by an embedded txsy font. The bad 
thing about this solution is that this degree character does not take 
care of \bf, \it, or \bi. Therefore the result is unsatisfactory.

If I use texnansi encoding for the PDF document then the degree symbol 
is typeset nicely. The disadvantage of this option is that now the 
built-in fonts are always reencoding which make some additional 2kb for 
the PDF document. I would like to have the reeconded font to be used 
only if it is really necessary.

Now I see two problems:
1. A particual problem in this situation
Is it possible to define font synonymes locally (i.e. inside a group)? 
In that case I could map the virtual fonts that are base on 8a encoded 
raw fonts into virtual fonts that are based on texnansi reencoded raw fonts.

I tried that but it seems that font synonymes are accepted only at the 
beginning.

2. A general problem
Provided that I write a set of typescripts for defining a typeface 
similar to the postscript typefaces of ConTeXt but based on other 
(virtual) fonts: is it possible to switch between these two typefaces. 
The switch must respect the current font characteristics (i.e. \ss, \rm, 
\tt, \bf, \it, \bi, and size).

Thanks for your attention,
--Stefan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context