Difference between revisions of "Psnfss - Old Content"

From Wiki
Jump to navigation Jump to search
m (moved psnfss to Psnfss: move to Uppercase)
(15 intermediate revisions by 9 users not shown)
Line 5: Line 5:
 
installed on your LaTeX system. One of its purposes is to access the
 
installed on your LaTeX system. One of its purposes is to access the
 
standard postscript fonts that printers have built in, also known as
 
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 thirty five base fonts.
 +
(Note, however, that the Adobe Type 1 (postscript) fonts have been replaced
 +
by the [http://www.adobe.com/type/opentype/T1_to_OTF_FAQ.htm OpenType] standard,
 +
available in ConTeXt through the [[TeX_Gyre]] fonts.)
 +
 
 +
Part of PSNFSS is a set of font metrics
 
(the tfm-files) that allows TeX to use the fonts for typesetting (TeX
 
(the tfm-files) that allows TeX to use the fonts for typesetting (TeX
 
only knows about metrics, not outlines).
 
only knows about metrics, not outlines).
 +
 +
'''PSNFSS contains the following fonts:'''
 +
<table style="width:100%; border:1px solid #DDDDDD;">
 +
<tr style="background-color:#CCCCCC;"><th>font family</th><th>styles</th><th>KB name</th><th>ConTeXt typescript</th></tr>
 +
<tr><td>AvantGarde</td><td>4: Book, Demi + Oblique</td><td>pag</td><td>urwgothic, using the [[modules:urwgothic| urwgothic typescript]]</td></tr>
 +
<tr style="background-color:#EEEEEE;"><td>Bookman</td><td>4: Light, Demi + Italic</td><td>pbk</td><td>bookman</td></tr>
 +
<tr><td>Courier</td><td>4: (Normal), Bold + Oblique</td><td>pcr</td><td>courier (''tt'')</td></tr>
 +
<tr style="background-color:#EEEEEE;"><td>Helvetica</td><td>4: (Normal), Bold + Oblique</td><td>phv</td><td>helvetica (''ss'')</td></tr>
 +
<tr><td>Helvetica-Narrow</td><td>4: (Normal), Bold + Oblique</td><td>phv*n</td><td>?</td></tr>
 +
<tr style="background-color:#EEEEEE;"><td>New Century Schoolbook</td><td>4: Roman, Bold + Italic</td><td>pnc</td><td>schoolbook</td></tr>
 +
<tr><td>Palatino</td><td>4: Roman, Bold + Italic</td><td>ppl</td><td>palatino</td></tr>
 +
<tr style="background-color:#EEEEEE;"><td>Symbol</td><td>1: (Normal)</td><td>psy</td><td>?</td></tr>
 +
<tr><td>Times</td><td>4: Roman, Bold + Italic</td><td>ptm</td><td>times</td></tr>
 +
<tr style="background-color:#EEEEEE;"><td>Zapf Chancery</td><td>1: MediumItalic</td><td>pzc</td><td>chancery (''cg''!)</td></tr>
 +
<tr><td>Zapf Dingbats</td><td>1: (Normal)</td><td>pzd</td><td>(access through symbols)</td></tr>
 +
</table>
  
 
== How do I access these fonts from ConTeXt? ==
 
== How do I access these fonts from ConTeXt? ==
  
If you don't have installed the font metrics with ConTeXt's
+
(MKII only; MKIV uses the [[TeX_Gyre]] fonts, see [[Fonts]])
<tt>texfont</tt>, you will have to change an internal mapping of
 
filenames with the commands
 
  
\usetypescript [adobekb][\defaultencoding]
+
You can use the various psnfss font families by using commands like
 
 
or whatever encoding you want to use. After that you can setup your
 
font with
 
 
 
\setupbodyfont[pos]
 
 
 
and similar commands.
 
  
 +
<texcode>
 +
\usetypescript[times][ec]
 +
\setupbodyfont[times,12pt]
 +
</texcode>
  
Added on July 5th, 2005 (by Otared K.):
+
Note that in the case of &ldquo;helvetica&rdquo; these lines should be replaced with:
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 "times", but you can say "palatino"):
 
  
 
<texcode>
 
<texcode>
\usetypescript [adobekb]   [ec]
+
\usetypescript[helvetica][ec]
\loadmapfile [context-base]
+
\setupbodyfont[helvetica,ss,12pt]
\usetypescript[times][\defaultencoding]
 
\setupbodyfont[times,12pt]
 
 
</texcode>
 
</texcode>
  
Note that in the case of "helvetica" the last two lines should be replaced with:
+
or
  
 
<texcode>
 
<texcode>
\usetypescript[helvetica][\defaultencoding]
+
\usetypescript[helvetica][ec]
\setupbodyfont[helvetica,ss,12pt]
+
\setupbodyfont[helvetica,12pt]
 +
\starttext
 +
\ss
 
</texcode>
 
</texcode>
  
since "helvetica is sans serif.  
+
since helvetica is sans serif.  
  
 
Here is an example:
 
Here is an example:
  
 
<texcode>
 
<texcode>
\usetypescript [adobekb] [ec] %% or \defaultencoding
+
%\usetypescript [adobekb][8r,ec] % uncomment for old ConTeXt
\loadmapfile [context-base]
+
\usetypescript[times][ec]
\usetypescript[times][\defaultencoding]
 
 
\setupbodyfont[times,12pt]
 
\setupbodyfont[times,12pt]
  
Line 58: Line 72:
 
And this is some maths with PostScript fonts.  
 
And this is some maths with PostScript fonts.  
 
\startformula
 
\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}.
+
{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
 
\stopformula
 
Some ligatures: ffi, ffl.  
 
Some ligatures: ffi, ffl.  
Line 65: Line 82:
 
</texcode>
 
</texcode>
  
== How do I get ... ? ==
+
== Examples of mixing typefaces ==
(make a list for all psnfss fonts)
+
Suppose you want
 +
* For normal text use the Times-Roman font
 +
* For math's use a different font, i.e. Latin Modern
 +
 
 +
then use
 +
 
 +
<texcode>
 +
\usetypescript[modern]
 +
\usetypescript[times][ec]
 +
 
 +
\definetypeface[MyFace][rm][serif][times][default][encoding=ec]
 +
\definetypeface[MyFace][mm][math][modern][default][encoding=ec]
 +
 
 +
\setupbodyfont[MyFace,12pt]
 +
</texcode>
 +
 
 +
 
 +
== Notes ==
 +
 
 +
'''Pdftex warning messages'''
 +
 
 +
You are likely to get some warnings from pdfetex like
 +
 
 +
  Warning: pdfetex (file ec-urw-times.map): cannot open font map file
 +
 
 +
but these are harmless and can be ignored.
 +
 
 +
'''Older ConTeXt releases (pre 2006.01.09)'''
 +
 
 +
If you use an older ConTeXt release (like one that came with your TeX installation)
 +
you will have to change an internal mapping of font filenames with this command:
 +
 
 +
<texcode>
 +
\usetypescript [adobekb][8r,ec]
 +
</texcode>
 +
 
 +
In new ConTeXt releases, this has become the default behaviour.
 +
 
 +
'''Even older ConTeXt releases'''
 +
 
 +
If you are stuck on Debian 3.1 like me, or are running a ConTeXt release before August 2003,
 +
you can download the adobekb.tex file from [http://levana.de/context/ levana.de].
 +
Or maybe upgrading teTeX from [http://www.backports.org/ backports] will solve that?
  
; palatino : load the typescript ''palatino'' like this
+
[[Category:Fonts]]
\usetypescript[palatino][\defaultencoding]
+
[[Category:From LaTeX]]
and switch to palatino with <cmd>setupbodyfont</cmd>
 
\setupbodyfont[palatino,12pt]
 

Revision as of 16:28, 10 September 2012

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. (Note, however, that the Adobe Type 1 (postscript) fonts have been replaced by the OpenType standard, available in ConTeXt through the TeX_Gyre 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 + Obliquepagurwgothic, using the urwgothic typescript
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?

(MKII only; MKIV uses the TeX_Gyre fonts, see Fonts)

You can use the various psnfss font families by using 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]

or

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

since helvetica is sans serif.

Here is an example:

%\usetypescript [adobekb][8r,ec] % uncomment for old ConTeXt
\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

Examples of mixing typefaces

Suppose you want

  • For normal text use the Times-Roman font
  • For math's use a different font, i.e. Latin Modern

then use

 \usetypescript[modern]
 \usetypescript[times][ec]

 \definetypeface[MyFace][rm][serif][times][default][encoding=ec]
 \definetypeface[MyFace][mm][math][modern][default][encoding=ec]

 \setupbodyfont[MyFace,12pt]


Notes

Pdftex warning messages

You are likely to get some warnings from pdfetex like

 Warning: pdfetex (file ec-urw-times.map): cannot open font map file

but these are harmless and can be ignored.

Older ConTeXt releases (pre 2006.01.09)

If you use an older ConTeXt release (like one that came with your TeX installation) you will have to change an internal mapping of font filenames with this command:

\usetypescript [adobekb][8r,ec]

In new ConTeXt releases, this has become the default behaviour.

Even older ConTeXt releases

If you are stuck on Debian 3.1 like me, or are running a ConTeXt release before August 2003, you can download the adobekb.tex file from levana.de. Or maybe upgrading teTeX from backports will solve that?