ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* FAQ: fonts
@ 2002-02-24 22:31 Henning Hraban Ramm
  2002-02-25 13:05 ` Taco Hoekwater
       [not found] ` <200202252123.g1PLNju01677@nathir.fiee.lan>
  0 siblings, 2 replies; 9+ messages in thread
From: Henning Hraban Ramm @ 2002-02-24 22:31 UTC (permalink / 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!


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-02-27 21:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-24 22:31 FAQ: fonts Henning Hraban Ramm
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

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).