Difference between revisions of "Psnfss - Old Content"

From Wiki
Jump to navigation Jump to search
m (added Category From LaTeX, Fonts)
(updated and simplified this page)
Line 32: Line 32:
  
 
<texcode>
 
<texcode>
\usetypescript [adobekb][\defaultencoding]
+
\usetypescript [adobekb][ec]
 +
\loadmapfile[8r-base.map] % or context-base.map, if you have it
 
</texcode>
 
</texcode>
  
or whatever encoding you want to use. After that you can setup your font with
+
After that you can setup your font with
  
 
<texcode>
 
<texcode>
Line 41: Line 42:
 
</texcode>
 
</texcode>
  
and similar commands.
+
and similar commands, like
 
 
 
 
Added on July 5th, 2005 (by Otared K.):
 
After some of us had difficulties using Postscript fonts, it seems that as of ConTeXt version 2005.06.27 (and pdfeTeX, Version 3.141592-1.20a-2.2 (Web2C 7.5.3)) the following declarations are the appropriate way of using Postscript fonts (in this instance we say &ldquo;times,&rdquo; but you can say &ldquo;palatino&rdquo;):
 
  
 
<texcode>
 
<texcode>
\usetypescript [adobekb]   [ec]
+
\usetypescript[times][ec]
\loadmapfile [context-base]
 
\usetypescript[times][\defaultencoding]
 
 
\setupbodyfont[times,12pt]
 
\setupbodyfont[times,12pt]
 
</texcode>
 
</texcode>
  
Note that in the case of &ldquo;helvetica&rdquo; the last two lines should be replaced with:
+
Note that in the case of &ldquo;helvetica&rdquo; these lines should be replaced with:
  
 
<texcode>
 
<texcode>
\usetypescript[helvetica][\defaultencoding]
+
\usetypescript[helvetica][ec]
 
\setupbodyfont[helvetica,ss,12pt]
 
\setupbodyfont[helvetica,ss,12pt]
 
</texcode>
 
</texcode>
Line 66: Line 61:
  
 
<texcode>
 
<texcode>
\usetypescript [adobekb] [ec] %% or \defaultencoding
+
\usetypescript [adobekb] [ec] %
\loadmapfile [context-base]
+
\loadmapfile[8r-base.map]
\usetypescript[times][\defaultencoding]
+
\usetypescript[times][ec]
 
\setupbodyfont[times,12pt]
 
\setupbodyfont[times,12pt]
  
Line 85: Line 80:
  
 
\stoptext
 
\stoptext
</texcode>
 
 
== How do I get ... ? ==
 
 
E.g. load the typescript ''palatino'' like this
 
<texcode>
 
\usetypescript[palatino][\defaultencoding]
 
</texcode>
 
and switch to palatino with <cmd>setupbodyfont</cmd>
 
<texcode>
 
\setupbodyfont[palatino,12pt]
 
 
</texcode>
 
</texcode>
  
 
[[Category:Fonts]]
 
[[Category:Fonts]]
 
[[Category:From LaTeX]]
 
[[Category:From LaTeX]]

Revision as of 15:06, 20 November 2005

What is PSNFSS?

PSNFSS is an abbreviation of ‘post script new font selecting system,’ a terminology from LaTeX. It is an additional package that is usually installed on your LaTeX system. One of its purposes is to access the standard postscript fonts that printers have built in, also known as the thirty five base fonts. Part of PSNFSS is a set of font metrics (the tfm-files) that allows TeX to use the fonts for typesetting (TeX only knows about metrics, not outlines).

PSNFSS contains the following fonts:

font familystylesKB nameConTeXt typescript
AvantGarde4: Book, Demi + ObliquepagNone - not a very suitable text font
Bookman4: Light, Demi + Italicpbkbookman
Courier4: (Normal), Bold + Obliquepcrcourier (tt)
Helvetica4: (Normal), Bold + Obliquephvhelvetica (ss)
Helvetica-Narrow4: (Normal), Bold + Obliquephv*n?
New Century Schoolbook4: Roman, Bold + Italicpncschoolbook
Palatino4: Roman, Bold + Italicpplpalatino
Symbol1: (Normal)psy?
Times4: Roman, Bold + Italicptmtimes
Zapf Chancery1: MediumItalicpzcchancery (cg!)
Zapf Dingbats1: (Normal)pzd(access through symbols)

How do I access these fonts from ConTeXt?

If you don't have installed the font metrics with ConTeXt's texfont, you will have to change an internal mapping of filenames with the commands

\usetypescript [adobekb][ec]
\loadmapfile[8r-base.map] % or context-base.map, if you have it

After that you can setup your font with

\setupbodyfont[pos]

and similar commands, like

\usetypescript[times][ec]
\setupbodyfont[times,12pt]

Note that in the case of “helvetica” these lines should be replaced with:

\usetypescript[helvetica][ec]
\setupbodyfont[helvetica,ss,12pt]

since helvetica is sans serif.

Here is an example:

\usetypescript [adobekb] [ec] %
\loadmapfile[8r-base.map]
\usetypescript[times][ec]
\setupbodyfont[times,12pt]

\starttext

\input knuth
\blank
And this is some maths with PostScript fonts. 
\startformula
{a \over b} = {c \over d} \iff ad - bc = 0, 
\qquad \int_0^{2\pi}\!\!\! \sin^2(x)dx =\pi, 
\qquad {\rm e}^{{\rm i}\pi} + 1 = 0,
\qquad \sum_{k=1}^{\infty}{1 \over k^2} = {\pi^2 \over 6}.
\stopformula
Some ligatures: ffi, ffl. 

\stoptext