PostScript /(font name) FindFont produces "not found, using Courier."

Viewed 549

I want to use a windows font in a .ps file which I will convert to PDF using Distiller

Distiller->settings->Font Locations has C:\Windows\Fonts in the list of places to look

Lydian Regular is a truetype font in c:\Windows\Fonts and its embedability is defined as print/preview

The instruction /(Lydian Regular) findfont
(in the .ps file I create) generates an error "Lydian Regular not found, using Courier."

So how to I get Distiller to use this (Lydian Regular) font and embed it in the pdf?

TFAI

1 Answers

You can't mix and match names and strings like that. You've correctly realised that you can't have a space in a name, so you can't have:

/Lydian Regular findfont

You are correct that it needs to be handled as a string (Lydian Regular) but you can't just stick a '/' in front, that doesn't make the string into a name. To make the string into a name you need to use the cvn operator:

(Lydian Regular) cvn findfont

However, the 'key' passed to findfont need not actually be a name, it's permissible for it to be any type, if it was previously associated with a font by use of definefont. It is probable that Distiller is seeing your code as the following tokens:

/
(Lydian Regular)
findfont

So that's an empty name on the stack, then a string, then findfont. Findfont will then look for a font defined with a string. I'm guessing that won't work no matter what.

So I would start by using the cvn operator.

But note that this still may not work, because the font may not be called 'Lydian Regular' (in PostScript). Note that the name on disk doesn't necessarily bear any relation to the font name, as defined internally in the font.

Also PostScript cannot use TrueType fonts directly, they have to be formatted as type 42 fonts. A number of PostScript interpreters (eg Ghostscript) can use TrueType fonts from disk as if they were Type42 fonts, but this involves a degree of guesswork. I've no idea if Adobe Distiller can do this or not.

Related