PS2PK(1)

πŸ“¦
version 75712 Β· 3 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 name ps2pk uses 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 from xres, 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 an xres of 329, using the default base resolution of 300, will include the "special" text mag=magstep(0.5) at the end of the font πŸ’–
  • -raspectratio β€” the aspect ratio you want, written as an expression integerY/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 of xres. If yres is different from xres, 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 and xres. For example, ps2pk -P17.28 Utopia-Regular results in Utopia-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) πŸ’…βœ¨