Search code examples
truetypepostscript

Use custom TTF font in a PostScript file


I'm trying to write my own PostScript file manually and want to use a custom TTF font downloaded from the web but it's not using it - either uses some other font or doesn't display the text at all. I don't have problems with the fonts installed in the system.

The commands I used were different variations of:

/FontName /TheFontName def /TheFontName 20 selectfont (XXXXXXXXXXX) show


Solution

  • You can't use a TrueType font directly in PostScript, unlike PDF PostScript doesn't support TrueType.

    In order to use a TrueType font you must first convert it into a type 42 font which PostScript does support.

    Adobe Technical Note 5012 documents the type 42 format