ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <angerweit@gmx.net>
Subject: FAQ: fonts
Date: Sun, 24 Feb 2002 23:31:29 +0100	[thread overview]
Message-ID: <200202242231.g1OMVT201729@nathir.fiee.lan> (raw)

There are some typescripts for usual fonts in your ConTeXt distribution. But 
they seldom seem to work. It's better to make your own new metrics and 
typescripts.

USING EXISTENT FONTS AND TFM METRICS

--- file: type-mine.tex ---

% this maps the font name to the TFM file name 
% (here: free URW "Times")
\starttypescript [serif] [times] [texnansi]
  \definefontsynonym [Times-Roman] [utmr8t] [encoding=texnansi]
  \definefontsynonym [Times-Italic][utmri8t][encoding=texnansi]
%  etc.
\stoptypescript

% this maps Serif to the specific font
\starttypescript [serif] [times] [name]
  \definefontsynonym [Serif]       [Times-Roman]
  \definefontsynonym [SerifItalic] [Times-Italic]
%  etc.
\stoptypescript

% tell pdftex to load a map file
\starttypescript [map] [texnansi]
  \loadmapfile [texnansi-urw-times.map]
\stoptypescript

\starttypescript [mine] [myset]
  \definetypeface [myset] [rm] [serif] [times] [default] [encoding=texnansi]
% and similar for ss/sans, mm/math, tt/mono fonts
\stoptypescript

--- end ---

--- file: mydoc.tex ---
...
\setupencoding     [default=texnansi]
\usetypescriptfile [type-mine]
\usetypescript     [mine] [myset]
\setupbodyfont     [myset,rm,12pt]
...
--- end ---

INSTALLING NEW FONTS

You need: Font binaries: PFBs or PFAs
          Font metrics:  AFMs
          Installed tools: AFM2TFM, VPtoVF, PLtoTF

--> see also mtexfont.pdf and mfonts.pdf!

1. copy all PFB/PFA and AFM files of one family to your "other" TeX root

2. call the texfont script:
   texfont --ve=vendor --co=collection --en=encoding  --fo=fontroot --in --ma
   e.g.: texfont --ve=adobe --co=palatino --en=texnansi 
--fo=/usr/local/texmf-var --in --ma
  This copies the files to the appropriate directories, makes TeX metrics,
  virtual fonts, a pdftex-mapfile and a test file (enc-vendor-collection.tex).

  I'd suggest to repeat it with "all" encodings that you could need (ec, 8r). 

3. write typescripts like above. you can copy some lines from the test files,
   but replace every encoding (texnansi in the above example) with
   "\defaultencoding".

4. use it in your docs like above

HTH

Grüßlis vom Hraban!
Greetlings from the Raven!


             reply	other threads:[~2002-02-24 22:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-24 22:31 Henning Hraban Ramm [this message]
2002-02-25 13:05 ` Taco Hoekwater
2002-02-25 16:24   ` Hans Hagen
2002-02-25 18:05     ` Frans Goddijn
2002-02-25 21:30       ` Henning Hraban Ramm
     [not found]         ` <005801c1be69$5c3b05a0$6401a8c0@lap>
2002-02-26 20:52           ` Henning Hraban Ramm
2002-02-27 21:57             ` Frans Goddijn
2002-02-26 10:53     ` Taco Hoekwater
     [not found] ` <200202252123.g1PLNju01677@nathir.fiee.lan>
2002-02-26 11:19   ` 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=200202242231.g1OMVT201729@nathir.fiee.lan \
    --to=angerweit@gmx.net \
    /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).