Description
This reference is a fascinating and complete guide to using fonts and typography on the Web and across a variety of operating systems and application software. Fonts & Encodings shows you how to take full advantage of the incredible number of typographic options available, with advanced material that covers everything from designing glyphs to developing software that creates and processes fonts.The era of ASCII characters on green screens is long gone, and industry leaders such as Apple, HP, IBM, Microsoft, and Oracle have adopted the Unicode Worldwide Character Standard. Yet, many software applications and web sites still use a host of standards, including PostScript, TrueType, TeX/Omega, SVG, Fontlab, FontForge, Metafont, Panose, and OpenType. This book explores each option in depth, and provides background behind the processes that comprise today's "digital space for writing":
* Part I introduces Unicode, with a brief history of codes and encodings including ASCII. Learn about the morass of the data that accompanies each Unicode character, and how Unicode deals with normalization, the bidirectional algorithm, and the handling of East Asian characters.
* Part II discusses font management, including installation, tools for activation/deactivation, and font choices for three different systems: Windows, the Mac OS, and the X Window System (Unix).
* Part III deals with the technical use of fonts in two specific cases: the TeX typesetting system (and its successor, W, which the author co-developed) and web pages.
* Part IV describes methods for classifying fonts: Vox, Alessandrini, and Panose-1, which is used by Windows and the CSS standard. Learn about existing tools for creating (or modifying) fonts, including FontLab and FontForge, and become familiar with OpenType properties and AAT fonts. Nowhere else will you find the valuable technical information on fonts and typography that software developers, web developers, and graphic artists need to know to get typography and fonts to work properly.
CONTENTS:
Contents
Introduction 1
Explorations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
TheLetter andItsParts . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
LetterpressTypesetting . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
DigitalTypesetting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
FontFormats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Between Characters and Glyphs: the Problems
of theElectronicDocument . . . . . . . . . . . . . . . . . . . . 15
TheStructureof theBookandWays toUse It . . . . . . . . . . . . . . . . . 17
HowtoReadThisBook . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
HowtoContactUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1 BeforeUnicode 27
FIELDATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
ASCII . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
EBCDIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
ISO 2022 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
ISO 8859 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ISO 8859-1 (Latin-1) and ISO 8859-15 (Latin-9) . . . . . . . . . . . . . . 36
ISO 8859-2 (Latin-2) and ISO 8859-16 (Latin-10) . . . . . . . . . . . . . 38
ISO 8859-3 (Latin-3) and ISO 8859-9 (Latin-5) . . . . . . . . . . . . . . . 39
ISO 8859-4 (Latin-4), ISO 8859-10 (Latin-6),
and ISO 8859-13 (Latin-7) . . . . . . . . . . . . . . . . . . . . . . 40
ISO 8859-5, 6, 7, 8, 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
ISO 8859-14 (Latin-8) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
vii
viii Contents
TheFarEast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Microsoft's codepages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Apple's encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Electronicmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
TheWeb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2 Characters, glyphs, bytes: An introduction to Unicode 53
Philosophical issues: characters andglyphs . . . . . . . . . . . . . . . . . . . 54
Firstprinciples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Technical issues: characters andbytes . . . . . . . . . . . . . . . . . . . . . . 62
Character encoding forms . . . . . . . . . . . . . . . . . . . . . . . . . . 64
GeneralorganizationofUnicode:planes andblocks . . . . . . . . . . . . . . 70
The BMP (Basic Multilingual Plane) . . . . . . . . . . . . . . . . . . . . 70
Higherplanes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Scriptsproposedfor addition . . . . . . . . . . . . . . . . . . . . . . . . 89
3 Properties of Unicode characters 95
Basicproperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Blockandscript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Age . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
General category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Other generalproperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Alphabetic characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Noncharacters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Ignorable characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Deprecatedcharacters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Logical-order exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Soft-dotted letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Mathematical characters . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Quotationmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Dashes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Hyphens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Contents ix
Terminalpunctuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Diacritics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Extenders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Joincontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
TheUnicode 1name andISO's comments . . . . . . . . . . . . . . . . 110
Properties thatpertaintocase . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Uppercase letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Lowercase letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Simple lowercase/uppercase/titlecasemappings . . . . . . . . . . . . . . 112
Special lowercase/uppercase/titlecasemappings . . . . . . . . . . . . . . 112
Case folding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Renderingproperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
TheArabic andSyriac scripts . . . . . . . . . . . . . . . . . . . . . . . . 114
Managing grapheme clusters . . . . . . . . . . . . . . . . . . . . . . . . 116
Numericproperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Reading aUnicodeblock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4 Normalization, bidirectionality, and East Asian characters 127
Decompositions andNormalizations . . . . . . . . . . . . . . . . . . . . . . 127
CombiningCharacters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
CompositionandDecomposition . . . . . . . . . . . . . . . . . . . . . 130
NormalizationForms . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
TheBidirectionalAlgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Typographyinbothdirections . . . . . . . . . . . . . . . . . . . . . . . 134
Unicode andBidirectionality . . . . . . . . . . . . . . . . . . . . . . . . 138
TheAlgorithm, Stepby Step . . . . . . . . . . . . . . . . . . . . . . . . 142
EastAsianScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
IdeographsofChineseOrigin . . . . . . . . . . . . . . . . . . . . . . . . 147
TheSyllabicKoreanHangulScript . . . . . . . . . . . . . . . . . . . . . 155
x Contents
5 UsingUnicode 159
InteractiveTools forEnteringUnicodeCharacters . . . . . . . . . . . . . . . 160
UnderMacOSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
UnderWindowsXP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
UnderXWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
VirtualKeyboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
UsefulConceptsRelatedtoVirtualKeyboards . . . . . . . . . . . . . . 167
UnderMacOSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
UnderWindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
UnderXWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
ConversionofText fromOneEncoding toAnother . . . . . . . . . . . . . . 183
The recode Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
6 Font Management on the Macintosh 187
TheSituationunderMacOS9 . . . . . . . . . . . . . . . . . . . . . . . . . . 188
The situationunderMacOSX . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Font-ManagementTools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Tools forVerificationandMaintenance . . . . . . . . . . . . . . . . . . 194
ATM: the SmootherofFonts . . . . . . . . . . . . . . . . . . . . . . . 196
ATR: classificationof fontsby family . . . . . . . . . . . . . . . . . . . . 199
FontManagers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Font Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Tools forFontConversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
TransType Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
dfontifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
FontFlasher, the KobayashiMaruofFonts . . . . . . . . . . . . . . . . 207
7 Font Management under Windows 209
Tools forManagingFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
TheExtensionofFontProperties . . . . . . . . . . . . . . . . . . . . . 212
Tools forVerificationandMaintenance . . . . . . . . . . . . . . . . . . 213
ATM: the SmootherofFonts . . . . . . . . . . . . . . . . . . . . . . . 215
FontManagers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Font Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Tools forFontConversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Contents xi
8 Font Management under X Window 221
SpecialCharacteristicsofXWindow . . . . . . . . . . . . . . . . . . . . . . . 221
LogicalDescriptionof aFontunderX . . . . . . . . . . . . . . . . . . . . . . 222
Installing fonts under X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Installing Bitmap Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Installing PostScript Type 1 or TrueType Fonts . . . . . . . . . . . . . . 229
Tools forManagingFontsunderX . . . . . . . . . . . . . . . . . . . . . . . . 231
Tools forConvertingFontsunderX . . . . . . . . . . . . . . . . . . . . . . . 232
TheGNUFontTools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
George Williams's Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Variousother tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
ConvertingBitmapFontsunderUnix . . . . . . . . . . . . . . . . . . . 233
9 FontsinTE
X and O, their installation and use 235
Using Fonts in TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Introduction to TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
The High Level: Basic LATEXCommands andNFSS . . . . . . . . . . . . 240
The Low Level: TEXandDVI . . . . . . . . . . . . . . . . . . . . . . . . 259
Aprs-TEX:Confronting theRealWorld . . . . . . . . . . . . . . . . . 263
Installing Fonts for TEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
The Tool afm2tfm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Basic Use of the Tool fontinst . . . . . . . . . . . . . . . . . . . . . . . . 277
MultipleMaster fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Customizing TEXFonts for theUser'sNeeds . . . . . . . . . . . . . . . . . . 285
HowtoConfigure aVirtualFont . . . . . . . . . . . . . . . . . . . . . . 285
Conclusions andGlimpses at theFuture . . . . . . . . . . . . . . . . . . . . . 312
10 Fonts and Web Pages 315
(X)HTML,CSS, andFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
TheStandardHTMLTags . . . . . . . . . . . . . . . . . . . . . . . . . . 318
CSS (version3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Tools forDownloadingFonts fromtheWeb . . . . . . . . . . . . . . . . . . 332
TrueDoc,byBitstream . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Font Embedding,byMicrosoft . . . . . . . . . . . . . . . . . . . . . . . . 336
xii Contents
GlyphGate,by em2Solutions . . . . . . . . . . . . . . . . . . . . . . . . 340
TheSVGFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
FundamentalConceptsofXML . . . . . . . . . . . . . . . . . . . . . . 345
Andwhat aboutSVG? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Font Selectionunder SVG . . . . . . . . . . . . . . . . . . . . . . . . . 351
AlternateGlyphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
SVGFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
11 The History and Classifications of Latin Typefaces 367
The Typographical Big Bang of the Fifteenth Century,
and the Fabulous Destiny of the Carolingian Script . . . . . . . 367
FromVenice toParis,byWayofRome . . . . . . . . . . . . . . . . . . 371
NewScriptsEmerge inGermany . . . . . . . . . . . . . . . . . . . . . . 381
TheWildAdventureofTextura inEngland . . . . . . . . . . . . . . . . 382
TheSunKingMakesWaves . . . . . . . . . . . . . . . . . . . . . . . . . 384
EnglandTakes theLeadinTypographic Innovation . . . . . . . . . . . 386
Didot andBodoniRevolutionizeTypefaces . . . . . . . . . . . . . . . . 390
TheGermanSturmundDrang . . . . . . . . . . . . . . . . . . . . . 393
TheNineteenthCentury,Eraof Industrialization . . . . . . . . . . . . 394
The Pre-war Period: Experimentation and a Return to Roots . . . . . . 397
ThePost-warPeriod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
SuggestedReading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
TheVox/ATypIClassificationofTypefaces . . . . . . . . . . . . . . . . . . . . 408
La classification Alessandrini des caractres: le Codex 80 . . . . . . . . . . . . 411
IBM'sClassificationofFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Class0:NoClassification . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Class1:Old-StyleSerifs . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Class2:TransitionalSerifs . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Class3:ModernSerifs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
Class4:ClarendonSerifs . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Class5:SlabSerifs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Class7:Free-FormSerifs . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Class8:Sans Serif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
Contents xiii
Class9:Ornamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Class10:Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Class12:Symbolic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
ThePanose-1Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
Parameter1:FamilyKind . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Parameter2:SerifStyle . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Parameter3:Weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Parameter4:Proportion . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Parameter5:Contrast . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Parameter6:StrokeVariation . . . . . . . . . . . . . . . . . . . . . . . 431
Parameter 7: Arm Style and Termination
ofOpenCurves . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Parameter8:Slant andShapeof theLetter . . . . . . . . . . . . . . . . 435
Parameter9:Midlines andApexes . . . . . . . . . . . . . . . . . . . . . 436
Parameter 10: X-height and Behavior of Uppercase Letters
Relative toAccents . . . . . . . . . . . . . . . . . . . . . . . . . 438
12 Editing and Creating Fonts 441
Software forEditing/CreatingFonts . . . . . . . . . . . . . . . . . . . . 442
GeneralPrinciples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
FontLab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
TheFontWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
Opening andSaving aFont . . . . . . . . . . . . . . . . . . . . . . . . . 452
TheGeneral-InformationWindow . . . . . . . . . . . . . . . . . . . . . 454
TheGlyphWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
TheMetricsWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
MultipleMasterFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
DrivingFontLabwithPythonScripts . . . . . . . . . . . . . . . . . . . 472
FontForge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488
TheFont-TableWindow. . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Opening/Saving aFont . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
TheGeneral-InformationWindow . . . . . . . . . . . . . . . . . . . . . 491
TheGlyphWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492
TheMetricsWindow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
xiv Contents
WhatAboutVerticalTypesetting? . . . . . . . . . . . . . . . . . . . . . 497
CIDFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
Autotracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
potrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
ScanFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
13 Optimizing a rasterization 505
PostScriptHints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
GlobalPostScriptHints . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
IndividualPostScriptHints . . . . . . . . . . . . . . . . . . . . . . . . . 512
TrueType Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
Managing Instructions inFontLab . . . . . . . . . . . . . . . . . . . . . 520
Managing Instructions under VTT . . . . . . . . . . . . . . . . . . . . . 529
Managing InstructionsunderFontForge . . . . . . . . . . . . . . . . . 546
14 Enriching Fonts: Advanced Typography 549
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
ManagingOpenTypeTables inFontLab . . . . . . . . . . . . . . . . . . . . . 555
FeatureDefinitionLanguage . . . . . . . . . . . . . . . . . . . . . . . . 556
FontLab'sUser Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 565
ManagingOpenTypeTables inVOLT . . . . . . . . . . . . . . . . . . . . . . 569
ManagingOpenTypeTables inFontForge . . . . . . . . . . . . . . . . . . . . 576
Anchors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
Noncontextual Substitutions . . . . . . . . . . . . . . . . . . . . . . . . 579
NoncontextualPositionings . . . . . . . . . . . . . . . . . . . . . . . . 580
Contextual Substitutions andPositionings . . . . . . . . . . . . . . . . 582
ManagingAATTables inFontForge . . . . . . . . . . . . . . . . . . . . . . . 586
Features andselectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
ManagingAAT'sFiniteAutomata inFontForge . . . . . . . . . . . . . 589
Contents xv
A Bitmap Font Formats 599
A.1 TheMacintoshWorld . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
A.1.1 The FONTFormat . . . . . . . . . . . . . . . . . . . . . . . . . . 599
A.1.2 TheNFNTFormat . . . . . . . . . . . . . . . . . . . . . . . . . 601
A.1.3 Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
A.2 TheDOSWorld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
A.2.1 TheCPIFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . 601
A.3 TheWindowsWorld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602
A.3.1 TheFNTFormat . . . . . . . . . . . . . . . . . . . . . . . . . . 602
A.3.2 TheFONFormat . . . . . . . . . . . . . . . . . . . . . . . . . . 604
A.4 TheUnixWorld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
A.4.1 ThePSFFormatofLinux . . . . . . . . . . . . . . . . . . . . . . 604
A.4.2 TheBDFFormat . . . . . . . . . . . . . . . . . . . . . . . . . . 606
A.4.3 TheHBFFormat . . . . . . . . . . . . . . . . . . . . . . . . . . 609
A.4.4 TheSNF,PCF, andABFFormats . . . . . . . . . . . . . . . . . . 610
A.4.5 TheRAWandCPFormats . . . . . . . . . . . . . . . . . . . . . 611
A.5 The TEXWorld . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
A.5.1 ThePXLandCHRFormats . . . . . . . . . . . . . . . . . . . . 612
A.5.2 TheGFFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
A.5.3 ThePKFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
A.5.4 Fontsor Images?Both! . . . . . . . . . . . . . . . . . . . . . . . 620
A.6 OtherLessCommonBitmapFormats . . . . . . . . . . . . . . . . . . . 621
A.7 WhoeverCanDoMoreCanAlsoDoLess . . . . . . . . . . . . . . . . . 621
B TEX and O Font Formats 623
B.1 TFM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
B.1.1 GlobalDeclarations . . . . . . . . . . . . . . . . . . . . . . . . . 625
B.1.2 FontParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
B.1.3 KerningPairs andLigatures . . . . . . . . . . . . . . . . . . . . 626
B.1.4 TheMetricPropertiesofGlyphs . . . . . . . . . . . . . . . . . . 631
B.2 OFM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
B.3 VF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
B.4 OVF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
xvi Contents
C PostScript Font Formats 635
C.1 IntroductiontothePostScriptLanguage . . . . . . . . . . . . . . . . . 635
C.1.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
C.1.2 TheSystemofCoordinates . . . . . . . . . . . . . . . . . . . . . 637
C.1.3 The current transformationmatrix . . . . . . . . . . . . . . . . 637
C.1.4 Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
C.1.5 Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641
C.1.6 BitmapImages . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
C.1.7 Managing the Stack, Tables, and Dictionaries . . . . . . . . . . 643
C.1.8 FontManagement andTypesetting . . . . . . . . . . . . . . . . 645
C.1.9 The ImageModel andtheGraphicsState . . . . . . . . . . . . . 646
C.1.10 StructuredComments (DSCs) . . . . . . . . . . . . . . . . . . . 647
C.2 Type3Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650
C.3 Type1Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655
C.3.1 Before We Begin: the Format of the File that Contains the Font 656
C.3.2 ThePublicDictionary . . . . . . . . . . . . . . . . . . . . . . . 657
C.3.3 Encodings forType1Fonts . . . . . . . . . . . . . . . . . . . . . 659
C.3.4 ThePrivateDictionary . . . . . . . . . . . . . . . . . . . . . . . 661
C.3.5 GlyphDescriptions . . . . . . . . . . . . . . . . . . . . . . . . . 665
C.3.6 IndividualHints . . . . . . . . . . . . . . . . . . . . . . . . . . . 666
C.3.7 AFMFiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
C.4 MultipleMasterFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
C.4.1 Using Multiple Master Fonts in the PostScript Language . . . . 681
C.4.2 TheAMFMfile . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
C.5 Type42Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
C.6 Type0,orOCF,Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
C.6.1 CharacterMapping . . . . . . . . . . . . . . . . . . . . . . . . . 684
C.6.2 TheACFMFile . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
C.7 CID Fonts (Types 9 - 11, 32) . . . . . . . . . . . . . . . . . . . . . . . . . 687
C.7.1 CIDFont . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
C.7.2 CMap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
C.7.3 Rearrangementof aCIDfont . . . . . . . . . . . . . . . . . . . 694
C.7.4 TheAFMFile for theCIDFont . . . . . . . . . . . . . . . . . . 696
Contents xvii
C.7.5 Using aCIDFont . . . . . . . . . . . . . . . . . . . . . . . . . . 696
C.8 Type2/CFFFonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
C.8.1 TheCompactFontFormat . . . . . . . . . . . . . . . . . . . . . 697
C.8.2 The charstringsofType 2 . . . . . . . . . . . . . . . . . . . . . . 700
D The TrueType, OpenType, and AAT Font Formats 705
D.1 TTX:TrueTypeFontsRepresentedinXML . . . . . . . . . . . . . . . . 706
D.2 TrueTypeCollections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
D.3 GeneralOverviewofTrueTypeTables . . . . . . . . . . . . . . . . . . . 709
D.4 TheKernelof theTrueTypeTables . . . . . . . . . . . . . . . . . . . . . 713
D.4.1 The GlyphOrderTable . . . . . . . . . . . . . . . . . . . . . . . . 713
D.4.2 The cmapTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
D.4.3 The headTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
D.4.4 The Tables hhea and hmtx . . . . . . . . . . . . . . . . . . . . . . 717
D.4.5 The maxpTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
D.4.6 The nameTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
D.4.7 The OS/2Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
D.4.8 The postTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
D.5 The Tables That Pertain to TrueType-Style Glyph Descriptions . . . . . 728
D.5.1 The locaTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
D.5.2 The glyfTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
D.5.3 The Tables fpgm, prep, and cvt . . . . . . . . . . . . . . . . . . . 730
D.6 The TrueType Tables That Affect PostScript-Style Glyph Descriptions . 731
D.6.1 The Table CFF . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
D.6.2 The Table VORG . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
D.7 BitmapManagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
D.7.1 The Tables EBLC and EBDT (Alias bloc and bdat) . . . . . . . . . 732
D.7.2 The EBSCTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
D.7.3 The bhedTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740
D.8 SomeOtherOptionalTables . . . . . . . . . . . . . . . . . . . . . . . . 740
D.8.1 The DSIGTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740
D.8.2 The gaspTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
D.8.3 The Tables hdmx and LTSH . . . . . . . . . . . . . . . . . . . . . . 741
xviii Contents
D.8.4 The kernTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
D.8.5 The VDMXTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748
D.8.6 The Tables vhea and vmtx . . . . . . . . . . . . . . . . . . . . . . 749
D.8.7 The PCLTTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750
D.9 TheOpenTypeAdvancedTypographicTables . . . . . . . . . . . . . . . 751
D.9.1 Important concepts . . . . . . . . . . . . . . . . . . . . . . . . . 751
D.9.2 The BASETable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
D.9.3 The GPOSTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
D.9.4 The GSUBTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
D.9.5 The JSTFTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796
D.9.6 The GDEFTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
D.10PredefinedFeatures,Languages, andScripts . . . . . . . . . . . . . . . 806
D.10.1 PredefinedLanguages andScripts . . . . . . . . . . . . . . . . . 806
D.10.2 PredefinedFeatures . . . . . . . . . . . . . . . . . . . . . . . . . 815
D.11GeneralAATTables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
D.11.1 The acntTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
D.11.2 The bslnTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
D.11.3 The fdscTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826
D.11.4 The fmtxTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826
D.11.5 The featTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
D.11.6 The lcarTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 838
D.11.7 The opbdTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 840
D.11.8 The propTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841
D.11.9 The trakTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 842
D.11.10The ZapfTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
D.12TheAATTables forFontVariation . . . . . . . . . . . . . . . . . . . . . 848
D.12.1 The fvarTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
D.12.2 The avarTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
D.12.3 The gvarTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851
D.12.4 The cvarTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
D.13AATTableswithFiniteAutomata . . . . . . . . . . . . . . . . . . . . . 856
D.13.1 FiniteAutomata . . . . . . . . . . . . . . . . . . . . . . . . . . . 856
D.13.2 The morx Table (Formerly mort) . . . . . . . . . . . . . . . . . . 862
D.13.3 The justTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872
Contents xix
E TrueType Instructions 879
E.1 BasicConcepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
E.1.1 Interpreter's Stack, InstructionStream . . . . . . . . . . . . . . 881
E.1.2 ReferencePoints . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
E.1.3 FreedomandProjectionVectors . . . . . . . . . . . . . . . . . . 881
E.1.4 TableofControlVectors andStorageArea . . . . . . . . . . . . 882
E.1.5 TouchedandUntouchedPoints . . . . . . . . . . . . . . . . . . 882
E.1.6 MinimumDistance andCut-In . . . . . . . . . . . . . . . . . . 882
E.1.7 Twilight Zone and Zone Pointers . . . . . . . . . . . . . . . . . 882
E.2 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
E.2.1 Instructions for Managing the Stack and Storage Area . . . . . 883
E.2.2 Managing Vectors, Zones, and Reference Points . . . . . . . . . 884
E.2.3 MovingPoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
E.2.4 d Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889
E.2.5 Tests andLogical andArithmeticFunctions . . . . . . . . . . . 890
E.2.6 DefinitionsofSubroutines andNewInstructions . . . . . . . . 891
E.3 SomeExamples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892
E.3.1 The 'T' in the Font Courier . . . . . . . . . . . . . . . . . . . . . 892
E.3.2 The 'O' from the Font Verdana . . . . . . . . . . . . . . . . . . . 899
F METAFONTand Its Derivatives 905
F.1 The METAFONTProgrammingLanguage . . . . . . . . . . . . . . . . . 906
F.1.1 BasicConcepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
F.1.2 The Basics: Drawing and Filling . . . . . . . . . . . . . . . . . . 908
F.1.3 More Advanced Concepts: Pen Strokes and Parameterization . 917
F.1.4 Optimizing theRasterization . . . . . . . . . . . . . . . . . . . . 930
F.2 The Computer ModernFamilyofFonts . . . . . . . . . . . . . . . . . . . 935
F.2.1 GeneralStructure . . . . . . . . . . . . . . . . . . . . . . . . . . 935
F.2.2 Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 944
F.3 MetaFog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 945
F.4 METATYPE1 and Antykwa Pltawskiego . . . . . . . . . . . . . . . . . . 947
F.4.1 Installing and Using METATYPE1 . . . . . . . . . . . . . . . . . 947
F.4.2 Syntactic Differences from METAFONT . . . . . . . . . . . . . . 948
F.4.3 Antykwa Pltawskiego . . . . . . . . . . . . . . . . . . . . . . . . 956
xx Contents
G BezierCurves 961
G.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
G.2 BezierCurves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
G.2.1 Definition and Interesting Properties . . . . . . . . . . . . . . . 963
G.2.2 deCasteljau'sAlgorithm . . . . . . . . . . . . . . . . . . . . . . 964
G.2.3 SubdivisionofBezierCurves . . . . . . . . . . . . . . . . . . . . 965
General Index 991
Index of Persons 1013
Published
Oct 2007
Publisher
O'REILLY & ASSOCIATES
ISBN
9780596102425
Pages
1016




Static Book Details Index Page - Click Here to go to Computer Manuals Website