ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Patrick Gundlach" <pg@levana.de>
Subject: Re: fonts in context (general question)
Date: 15 Mar 2004 23:18:11 +0100	[thread overview]
Message-ID: <m2hdwpdaak.fsf@levana.de> (raw)
In-Reply-To: <20040315200943.19D8C10ABC@ref.ntg.nl> (Severin Obertufer's message of "Mon, 15 Mar 2004 21:12:01 +0100")

Hello Severin,

> i have a general question to the use of fonts in context.

Your question applies to TeX in general (LaTeX as well as other
formats). 

> is that true that i always need a *.tfm and *.pfb file of a font to use it
> in context??

if you use pdftex: yes. If you use Knuth's TeX: only *tfm files are
used. But as soon as you generate a ps or pdf file for
viewing/printing, the pfb file gets used.

> if i generate some *.tfm (from afm files) with "texfont" context complains
> about not finding the *.pfb files.

I don't know anything about texfont, but this looks slightly odd at
first sight. 

> when I use texfont *.tfm and *.vf are generated. what are the *.vf files
> good for??

vf stands for virtual font. These fonts are normally used to change
the encoding of an original font. You use the vf without noticing it,
when switching to ec encoding for example. The dvi driver (or pdftex)
is mapping the special characters (8-bit characters) to the
position really used in the font (well, not completely true) by
looking at the virtual font. For example when you request a ß
(germandbls) and have ec encoding activated, TeX looks for a glyph in
position 255 (decimal).  But the real font is 8r encoded and the
germandbls is in position 223. There is a virtual font (phvr8t.vf for
example) that has the mapping 255 -> 223 (377 -> 337 octal):

(CHARACTER O 377
   (CHARWD R 0.610999)
   (CHARHT R 0.735498)
   (CHARDP R 0.011493)
   (MAP
      (SETCHAR O 337)
      )
   )

So TeX gets the dimensions from the vf as above, but the dvi/pdf
driver looks inside the vf and sees "the charcter 377 (octal) is
really character 337 (octal)". But there is much *more* that can be
done with vf. See Knuth's "More fun for grand wizards" article about
virtual fonts.



Patrick
-- 
Morgen gibts kein ABC mehr...

      reply	other threads:[~2004-03-15 22:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 20:12 Severin Obertufer
2004-03-15 22:18 ` Patrick Gundlach [this message]

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=m2hdwpdaak.fsf@levana.de \
    --to=pg@levana.de \
    --cc=ntg-context@ntg.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).