home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 12 Font
/
12-Font.zip
/
T1FONT.ZIP
/
t1font.doc
< prev
next >
Wrap
Text File
|
1991-10-14
|
3KB
|
76 lines
t1font - Adobe Type 1 Font Utility
Version 1.0 14 Oct 1991
-------------------------
This is the first version of this code. Tested using ATM and ISIL
Gothic fonts (all from Adobe).
This utility allows the conversion between various forms of the
Adobe Type 1 fonts. Type 1 fonts are used by PostScript and Adobe
Type Manager (ATM). The three forms are:
1. Binary - (.pfb) This is the compressed and encrypted form of the
font normally used on the PC. The encrypted parts of
the font are in binary.
2. ASCII - (.pfa) This is the form of font which is sent to a
PostScript printer, and used on most Unix systems. The
encrypted parts are kept in hex.
3. Expanded - (.pfx) This form is private to t1font, and decrypts the
data to be readable by humans. This also allows the
font information to be modified.
Syntax:
t1font infile outfile -abx
-a = Output ascii (hex) font
-b = Output binary (compressed) font
-x = Output expanded (decrypted) font
t1font can tell what format the input file is in, so you just tell
it what format you want the output to be in. Only one of the file
options can be specified.
If no option is specified, the default action is to convert
expanded and ASCII fonts to binary, and to convert binary fonts
to ASCII.
*** NOTE *** The fact that this code allows you to decrypt and modify
type 1 fonts does not mean you have the legal right to do so. You
should check the licence agreements for the font to determine if this
is a valid thing to do.
The information about what the font means is derived from "Adobe Type
1 Font Format", available at your local book store.
The only real way to parse a type 1 font is with a PostScript (forth)
parser. This is a simplistic parser, but it matches the ATM parser
for the most part.
The expanded mode parser corrects charstring lengths, but does very
little other checking. The fact that the conversion works does not
mean the font is any good.
Roundtrip conversions starting with a font created by t1font (and hence
triple conversions) should give exact results. Conversions of fonts
created by others will not give exact results because of differences
in insertion of CR and LF characters, and in the differing random
characters stuffed in the datastream.
Notes:
1. This code was started as a excercise in expanding type 1 fonts
after I got the Adobe Type 1 Font Format book. I expanded it
to convert between all formats.
2. I have no plans to add any more functions, but I will fix bugs
as I (or others) find them. The most likely area of problems
is in the parser for expanded form. Parsers for the other forms
may also be a problem, since they are much more simplistic than
a full PostScript parser.
3. The source is included as part of this package. Do what you
like with it (like make a DOS executable).
Ken Borgendale
kwb@betasvm2.vnet.ibm.com