home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
d
/
dmpfot10.zip
/
DUMPFOT.DOC
next >
Wrap
Text File
|
1993-01-06
|
11KB
|
168 lines
6 January 1993
DumpFOT 1.00
Copyright 1993 by Rufus S. Hendon. All rights reserved.
DumpFOT extracts the descriptive information about a TrueType font that is
contained in its .FOT file. A .FOT file is created by the "Fonts" module of
Control Panel whenever it installs a TrueType font from a .TTF file.
DumpFOT takes two arguments. The first is a file specification, which may
include wildcards; it must specify one or more TrueType .FOT files. The
second argument is the name for the file into which the output of the program
is to be written.
DumpFOT reads the .FOT files matching the file specification given as the
first argument. For each .FOT file it writes into the output file a section
giving the information about the font contained in the .FOT file.
The following command, for example, would cause DumpFOT to process all the
.FOT files in the \WINDOWS\SYSTEM directory with names beginning with BOOKOS,
writing the output into D:\BOOKOS.DMP:
dumpfot \windows\system\bookos*.fot d:\bookos.dmp
If the arguments are followed by the option '/O' or '/o', each item of
information will be preceded by its offset in the .FOT file, in hexadecimal
form. These offsets may be useful if you wish to modify a .FOT file using a
hex editor.
Here are fuller explanations of the font characteristics reported by
DumpFOT (quotations are from Microsoft Windows Version 3.1 Software Development
Kit, Programmer's Reference, Volume 4: Resources, pp. 50-53):
Type: The type of font file. All .FOT files I have seen have 03 hex as
the low-order byte; the fact that the low-order bit of this byte is
1 indicates that the font is a vector rather than a bitmap font.
The significance of the fact that bit 1 of this byte is also 1 is
not explained in the Programmer's Reference. In .FOT files the high-
order byte indicates the style of the font: 00 or 40 hex for
regular, 01 hex for italic, 20 hex for bold, and 21 hex for bold
italic. I don't know what the difference is between the two variants
for regular, 00 and 40 hex.
Font units per em: This item is officially labeled "Point size" and is
supposedly "the nominal point size ... at which this character set
looks best." In .FOT files, however, it is the number of units
("font units") per em, where em is the width and height of an
imaginary square (the "em square") within which characters are
designed (characters may, however, extend beyond the em square). For
original TrueType fonts, the number of font units per em is normally
2048. For fonts originally designed as PostScript Type 1 fonts, the
number is usually 1000.
Vertical and horizontal resolution: The nominal vertical and horizontal
resolution, in dots per inch, at which the character set was
digitized. In .FOT files, 72 x 72 seems to be standard. These
values have no relevance to the use of the font for printing.
Ascent: This is "the distance from the top of a character-definition cell
to the base line" of the font. (The base line is the line on which
letters are aligned vertically; the bottom of letters without
descenders sits on the base line.) The "character-definition cell"
is presumably the same as the "grid" the height of which is specified
by "Grid height". Ascent is expressed in font units.
Internal leading: Leading is space that separates successive lines of
type. Internal leading is leading that is included as part of the
design of characters. It occupies the upper portion of the grid
the height of which is given by "Grid height". This space is blank
for ordinary characters, but accent marks may fall within it.
Internal leading is measured in font units.
External leading: The recommended amount of extra leading to be added
between lines of type, expressed in font units.
Italic: A flag indicating whether the font is italic (oblique).
Underlined: A flag indicating whether the font has underlining as part of
the character designs.
Strikeout: A flag indicating whether the font has a strikeout line as
part of the character designs.
Weight: A number in the range 1-1000 indicating the weight of the font.
Higher numbers indicate "heavier" fonts, with thicker strokes and a
blacker appearance on the page; normally only 0 (indicating that the
weight is unspecified) and multiples of 100 are used. The convention
in .FOT files is for weight 400 to be specified for the non-bold
styles (regular and italic) of a given typeface and weight 700 for
the bold styles (bold and bold italic). This is unrelated to the
overall weight of a typeface: the regular styles of both Helvetica
and HelveticaBlack, for instance, would be given weight 400, even
though regular HelveticaBlack is a heavier font than regular
Helvetica. Deviations from this convention are sometimes found. For
example, Monotype's Bookman Old Style (included in the Microsoft
TrueType Font Pack) has .FOT files in which the weight of the non-
bold styles is 300 and the weight of the bold styles is 600.
Character set: A number identifying the character set. The only values
you're likely to see are 0 for the ANSI character set (i.e. the
Windows character set), 2 for "symbol" character sets (such as those
of the Symbol and Wingdings fonts), and 255 for the OEM character set
(i.e. the DOS character set).
Grid width and grid height: The dimensions of the grid on which the
characters of the font were designed, expressed in font units. In
.FOT files, grid width is always 0. The grid height is such that all
character designs fit within it; the space specified as internal
leading is included in the grid height.
Pitch and family: If this number is odd, the font is variable-pitch (i.e.
proportional-spaced); otherwise it is fixed-pitch. (Most TrueType
typefaces are proportional-spaced, but some, such as Courier New and
Lucida Sans Typewriter, are fixed-pitch.) The four high bits (the
first hex digit) classify the font as belonging to one of six
Windows-defined families that "describe the general look of a font."
The six families are labeled "Don't care" (any font fits this
category), "Roman" (proportional-spaced fonts with serifs), "Swiss"
(sans-serif proportional-spaced fonts), "Modern" (fixed-pitch fonts),
"Script" (cursive or script fonts), and "Decorative" (novelty fonts).
Average width: For proportional-spaced fonts, the width of "X". For
fixed-pitch fonts, the width of every character in the font.
Maximum width: The maximum width of any character in the font. (For
fixed-pitch fonts, you would expect from the definitions that maximum
width would be the same as average width, but it isn't. I don't know
why the two are different.)
First character: The first character code defined in the font.
Last character: The last character code defined in the font.
Default character: This is "the character to substitute whenever a string
contains a character that is out of range" (i.e. the range defined by
"First character" and "Last character"). The number given for
"Default character" is the difference between the code of the default
character and that of the first character, so the actual code of the
default character = "First character" + "Default character".
Break character: The character "that defines word breaks for word
wrapping and word-spacing justification." The number given is the
difference between the code of the break character and that of the
first character, so the actual code of the default character =
"First character" + "Break character".
===============================================================================
NOTICE
DumpFOT is a copyrighted program, the distribution and use of which are
controlled by the author and copyright owner, Rufus S. Hendon. It is not in
the public domain.
You may use the DUMPFOT program and this documentation file for your own
private, non-commercial purposes; there is no registration fee or other type of
charge for such use. You may give copies of the program to other individuals
for their private, non-commercial use, provided that such copies include both
the program file (DUMPFOT.EXE) and this documentation file (DUMPFOT.DOC) in
unaltered form and provided that you neither request nor accept remuneration in
any form for the copies.
Commercial distribution of DumpFOT is forbidden unless there has been prior
approval by the copyright owner and the payment of a license fee. Prohibited
forms of commercial distribution include the bundling of the program with
commercially distributed products such as software and books, the distribution
of the program as part of a "premium" for magazine subscribers, the
distribution of the program by companies that sell collections of "freeware"
and "shareware" programs on disks, and the posting of the program on electronic
bulletin boards maintained by vendors of commercial products in support of
those products.
DUMPFOT is made available without warranty of any kind. The copyright
owner is not liable for any damages resulting from the use of the program.
===============================================================================
Communications may be sent to me at this address:
Rufus S. Hendon
804 Still Hill Road
Hamden, CT 06518-1105
Electronic mail may be sent to userid 73250,2674 on CompuServe.