PS2PK(1)
π PS2PK(1) π
General Commands Manual π okay bestie, this is the page for the one and only ps2pk β¨
πΈ NAME πΈ
ps2pk is the tool that creates a TeX pkfont from a type1 PostScript font. It's giving font transformation, no cap π
π§ SYNOPSIS π§
ps2pk [ -v ] [ -eenc ] [ -Xxres ] [ -Eexpansion ] [ -Sslant ] [
-Ppointsize ] [ -Rbaseres ] [ -raspectratio ] [ -Yyres ] [ -aAFMfile ]
[ -mmodename ] type1 [pkfont]
β¨ DESCRIPTION β¨
okay so this program takes a type1 PostScript font, renders it at a pointsize (default 10.0 points) and resolution (default 300dpi), and spits out a TeX pkfont. Iconic behavior π¦
To make the pkfont, ps2pk needs a valid type1 font file (for example Utopia-Regular, Utopia-Regula.pfb or Utopia-Regula.pfa) and its matching AFM-file (Utopia-Regular.afm) that holds the font metrics. It accepts both the binary type1 format (Utopia-Regula.pfb) and the ASCII version (Utopia-Regular or Utopia-Regula.pfa). To find these files, it uses the kpathsea library (check the info page on kpathsea π«Ά). Also, pfb and pfa files get searched for in whatever directory the environment variable T1INPUTS points to, and afm files get searched in AFMFONTS, if those are set. The -v flag will show you which filenames it's looking for, so use it when you're lost π₯
The program makes a pkfont where the character codes come from their AFM (Adobe Font Metrics) defined values. If you want something different, you can overrule that with an explicit encoding file using the -e option. The encoding file enc should hold a valid PostScript encoding with PostScript names like /hyphen. Here's an incomplete example (see afm2tfm for the complete syntax) π
% This is the EC encoding.
/ECEncoding [ % now 256 chars follow
% 0x00
/grave /acute /circumflex /tilde /dieresis /hungarumlaut
/ring /caron /breve /macron /dotaccent /cedilla
/ogonek /quotesinglbase /guilsinglleft /guilsinglright
(Rest of lines omitted.)
% 0xF0
/eth /ntilde /ograve /oacute /ocircumflex /otilde
/odieresis /oe /oslash /ugrave /uacute /ucircumflex
/udieresis /yacute /thorn /germandbls ] def
π OPTIONS AND ARGUMENTS π
-aAFMfileβ overrules the nameps2pkuses to find the AFM file π¦-eencβ the name of a file holding an encoding scheme. By default, it uses whatever encoding is named in the AFM-file. The actual PostScript name of the encoding scheme gets written as a "special" at the end of the pkfont β¨-Eextensionβ the extension factor, a real value that defaults to 1.0 π-mmodenameβ a modename like the ones METAFONT uses. Defaults to "Unknown mode" π-Ppointsizeβ the pointsize you want, as a real value. Defaults to 10.0 points π-Rbaseresβ the base resolution you want, as an integer. Defaults to 300 dpi. If it's different fromxres, the matching magnification shows up in the "specials" at the end of the pkfont. If it can be written as a magstep, it's a magstep, otherwise it's a real number. For example, a pkfont with anxresof 329, using the default base resolution of 300, will include the "special" textmag=magstep(0.5)at the end of the font π-raspectratioβ the aspect ratio you want, written as an expressionintegerY/integerX. Defaults to 300/300. It gets shown in the "specials" at the end of the pkfont. Setting the aspect ratio creates a value for yres, but an explicit yres value always wins. If there are spaces around/, you need to wrap the argument in "" π-Sslantβ the slant, a real value that defaults to 0.0 π§-Xxresβ the resolution in the X direction, an integer. Defaults to 300 dpi β-Yyresβ the resolution in the Y direction, an integer. Defaults to the value ofxres. Ifyresis different fromxres, a "special" with the aspect ratio gets written at the end of the pkfont πΈ-vβ the verbose flag. It tells you what the program is up to πtype1β the name of the PostScript type1 font. The AFM-file name gets built from this by stripping the extension (if there is one) and adding ".afm". The PostScript "FontName" gets pulled from the AFM-file and written into a "special" at the end of the pkfont π«Ά[pkfont]β an optional name for the resulting pkfont, if you want to overrule the default. The default is built from the basename of the type1 font, the pointsize andxres. For example,ps2pk -P17.28 Utopia-Regularresults inUtopia-Regular17.300pk. If the type1 font name already shows the pointsize, you need to give an explicit pkfont name, otherwise the pointsize gets stuck onto the pkfont basename, which is usually not what you want π
The following PK "specials" give an internal check on the pkfont's characteristics, following the recommendations of the TeX Working Group on the TeX Directory Standard (TWG-TDS): "fontid=FontName", "codingscheme=Encoding", "fontfacebyte", "mag", "mode=(ps2pk)modename", "pixels-per-inch", and "aspect-ratio" if it's something other than unity π₯
π ACKNOWLEDGEMENT π
This program uses the Type1 hinting and rendering software that IBM donated to the X Consortium. Thank you, IBM π«Ά
π¦ SEE ALSO π¦
METAFONT: The Program, Donald Knuth πThe GFtoPK processor, belonging to the METAFONTware πAdobe Font Metric Files, Version 3.0, PostScript Developer Support Group π- afm2tfm(1)
- pk2bm(1)
- kpsewhich(1)
- info kpathsea
β VERSION β
1.4 (January 1994) π
π AUTHOR π
Piet Tutelaers, modified for ps2pkm by Pierre A. Mackay. This manpage was adapted to teTeX by Frank Kuester π§
Maintained in TeX Live. Please send bug reports or other correspondence to tex-k@tug.org (https://lists.tug.org/tex-k) π
Thanks for reading, bestie! π Last updated 30 August 2022, PS2PK(1) π β¨
π¦ where this page comes from
- alpine 3.24: texlive-doc 2026.0-r0 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- arch rolling: texlive-doc 2026.1-1 Β· GPL
- debian trixie: texlive-binaries 2024.20240313.70630+ds-6 Β· TeX-Live
- fedora 43: texlive-ps2pk 11:svn66186-93.fc43 Β· MIT
- fedora 43: texlive-ps2pk 11:svn66186-95.fc43.1 Β· MIT
- fedora 44: texlive-ps2pk 12:svn75712-105.fc44 Β· MIT
- fedora 44: texlive-ps2pk 12:svn75712-111.fc44 Β· MIT
- opensuse-leap 16.0: texlive-ps2pk 2025.221.svn66186-160000.3.1 Β· LPPL-1.0
- ubuntu noble: texlive-binaries 2023.20230311.66589-9build3 Β· TeX-Live
- ubuntu questing: texlive-binaries 2024.20240313.70630+ds-6ubuntu2 Β· TeX-Live
- ubuntu resolute: texlive-binaries 2025.20250727.75242+ds-5build1 Β· TeX-Live
- ubuntu stonking: texlive-binaries 2026.20260303.78225+ds-5ubuntu1 Β· TeX-Live
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms