I am trying to embed truetype font Treubuchet MS in a PCL5 generating program. But I've stumbled on a problem. To embed and use the the font I should know its typeface, when selecting it for use in the *.pcl file. But I can't find a reference, where fonts and their typefaces(numbers) are described.
To be more precise, I am using the below sequence for selecting Treubuchet MS regular:
esc(s0S esc(s0B esc(s25513T esc(6982X
Explanation: not italic, not bold, typeface of font, id of font to be loaded to printer. But my currently selected typeface (25513) is wrong and the font is not sent and loaded to the printer (soft font added in the file).
Could you help me with this?
As far as I can see, the font ID you need is the one supplied when you created, and downloaded, the soft font.
Note that on page 189 of the PCL 5 reference (section 11-5 Soft Font Creation, in case you have a different version of the spec) it says:
Use the Font ID command to designate a unique ID number prior to the download of a font header. If an existing font is already associated with this ID, the existing font is deleted upon the download of the font header.
The Font ID command can be found on p156 of my copy of the spec:
The Font ID command is used to specify an ID number for use in subsequent font management commands. The ID number of a font can be used to select the font for printing (refer to “Font Selection by ID” in Chapter 8). E C *c#D # = ID number Default = 0 Range = 0 - 32767 The font ID number is used during subsequent soft font downloads, selections or deletions. The factory default font ID is 0 (if no Font ID command is sent, an ID of 0 is assigned).
So before you download the soft font you should specify the font ID of the font, eg:
esc*c1D
Then download the font. When you want to use the font you downloaded then you select it with:
esc(1X
Still not a PostScript question though :-)