ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <bittext@quicknet.nl>
Subject: Re: [Q] how to use 8r-encoded fonts
Date: Tue, 13 Feb 2001 23:23:31 +0100	[thread overview]
Message-ID: <3A89B3E3.D37C20E@quicknet.nl> (raw)
In-Reply-To: <3.0.6.32.20010213180550.015d3ec0@server-1>

Hans Hagen wrote:
> 
> At 02:45 PM 2/13/01 +0100, you wrote:
> >Dear all,
> >
> >could anyone please tell me how to use a 8r-encoded font with context?
> 
> Isn't that ec? I always use texnansi, but taco fo rsure knows -)

It's not precisely ec, but it's the base behind ec. Ec encoded fonts 
are virtual fonts, but it is not possible to reach an unencoded glyph 
from a virtual font (and a lot of characters in a typical postscript 
font are 'not used' in adobe encoding), so the PostScript font 
needs to be re-encoded first so that all glyphs are in usable slots. 

That's what 8r (r for raw) is: a re-encoded postscript font. It's a 
very nasty encoding to work with because the accents are all in weird 
places (for TeX), and there are usualy no ligatures nor kerning info
in the metric files. 

Thanh, why do you need it and precisely what font is it?  If you just 
need a 'simple' re-encoded font, it is probably better to re-encode
to TeXNAnsi (8y) which is both a better reencoding and directly
supported
by context.

Basic recipe for using weird encodings:

- write (or find) a file that maps all \uccode and \lccode and \accent
commands
to the right places (that's what the enco-ec and enco-il2 etc. files do)
Suppose you call this encoding 'raw'

- Write a font definition file that maps Symbolic font names to the
corres
ponding metrics (like font-ber.tex), like this:

\definefontsynonym [Serif] [ptmr8r]  [encoding=raw] 

- Now at the end of this file, redefine the bodyfont commands to make
sure 
that the mapping actually takes place:

\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm]
[default]  

- That's it.

Basic recipe for using a weird font that you only need ascii or a 
specific character from:

\definefont[myfont][ptmr8r sa 1]

Now you can just call  \myfont, as in plain TeX (bonus: the 'sa' stands
for 'scaled at'. Symbol fonts defined this way honour \switchtobodyfont
commands.

Greetings, Taco


  reply	other threads:[~2001-02-13 22:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-13 13:45 Han The Thanh
2001-02-13 17:05 ` Hans Hagen
2001-02-13 22:23   ` Taco Hoekwater [this message]
2001-02-14  9:56     ` Han The Thanh
2001-02-14 12:45       ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A89B3E3.D37C20E@quicknet.nl \
    --to=bittext@quicknet.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).