TTF to UFM conversion

Hi,

I have a True Type font say True.ttf

I want to convert this to an UFM file so that I can
use its metrics in a printer minidriver on Windows
2000.

Request anyone to suggest how can I do this so that I
get a correct UFM file for a particular TTF file.

Why I require this?

I am trying to modify the printer minidriver by
having a plugin so that once I choose my own TTF font
in an application, I want to substitute that font
with a device font.

I tried to take a sample UFM file from the DDK.

However since the metrics of the TTF file does not
match with the sample UFM file, GDI is trying to
apply some correction factors because of which I am
forced to send some positioning ESC commands to my
printer.

Please note that once positioning commands are sent,
our printer head will moveleft and right with jerks
and such the basic purpose of printing in device font
is defeated (speed is drastically reduced)

Regards,
Girish Joshi

If all you want to do is font substitution, I don’t see why you have to
obtain the UFM file for a true type font. You can enable TTF
substitution in the GPD file and specify which device font you want to
use instead of a particular TTF.

You will need to set *TTFSEnabled to TRUE in the GPD and have sections
similar to the ones below for the fonts that you want to substitute.

*TTFS: Arial
{
*TTFontName: “Arial”
*DevFontName “Arial”
}
*TTFS: TNR
{
*TTFontName: “Times New Roman”
*DevFontName: “Times New Roman”
}
*TTFS: CurrierNew
{
*TTFontName: “Courier New”
*DevFontName: “Courier New”
}

  • Ashwin

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Girish Joshi [mailto:xxxxx@tecknodreams.com]
Sent: Thursday, June 27, 2002 9:47 PM
To: NT Developers Interest List
Subject: [ntdev] TTF to UFM conversion

Hi,

I have a True Type font say True.ttf

I want to convert this to an UFM file so that I can
use its metrics in a printer minidriver on Windows
2000.

Request anyone to suggest how can I do this so that I
get a correct UFM file for a particular TTF file.

Why I require this?

I am trying to modify the printer minidriver by
having a plugin so that once I choose my own TTF font
in an application, I want to substitute that font
with a device font.

I tried to take a sample UFM file from the DDK.

However since the metrics of the TTF file does not
match with the sample UFM file, GDI is trying to
apply some correction factors because of which I am
forced to send some positioning ESC commands to my
printer.

Please note that once positioning commands are sent,
our printer head will moveleft and right with jerks
and such the basic purpose of printing in device font
is defeated (speed is drastically reduced)

Regards,
Girish Joshi


You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%