Architecture, Rendering and Implementation Across Windows, Linux and macOS
Introduction: The Hidden Complexity of Text
Chapter 1: The Layers of Modern Typography
- From Design Vocabulary to Software Systems
- The Typography Stack: A Vertical Slice
- Why Typography Is Harder Than It Looks
- What This Book Will Do
Chapter 2: Characters, Encodings and Unicode
- From ASCII to the World
- Code Points, Characters and the Unicode Standard
- Blocks, Scripts and Planes
- Normalization and Equivalent Representations
- Unicode as Typography’s Foundation
Chapter 3: Glyphs, Graphemes and Text Segmentation
- Character vs Glyph: The Critical Distinction
- Grapheme Clusters and the UAX #29 Algorithm
- Word Boundaries and Sentence Boundaries
- Script Segmentation and Run Detection
- Practical Implications for Rendering
Chapter 4: Font Metrics and Measurement Systems
- Units of Typographic Measure
- The Anatomy of a Typeface’s Metrics
- Baselines, Alignment Zones and Vertical Rhythm
- Kerning, Tracking and Letter-Spacing
- Device-Independent Measurement and Scaling
Chapter 5: The SFNT Container and Table Architecture
- From Metafont to TrueType to OpenType
- The SFNT Table Directory
- Checksums and Integrity
- Naming Conventions and Versioning
- Extensibility Through Unknown Tables
Chapter 6: Core Font Tables: head, hhea, maxp, name, OS/2
- head: Global Font Metadata
- hhea and maxp: Layout Parameters and Limits
- name: Identifying Fonts to Humans and Systems
- OS/2: Windows Metrics and Classification
- How Tables Interact to Define a Font
Chapter 7: Mapping and Metrics: cmap, hmtx, glyf, loca
- cmap: Character-to-Glyph Mapping
- hmtx: Horizontal Advance and Sidebearings
- glyf and loca: Outline Geometry
- Composite Glyphs and References
- Reading Outline Data in Practice
Chapter 8: PostScript and CFF-Based Fonts
- PostScript Type 1: The Adobe Approach
- CFF: Compact Font Format
- CharStrings and Subroutines
- Bezier Curves: Cubic vs Quadratic
- CFF2 and Variable Fonts
Chapter 9: OpenType Layout: GSUB, GPOS, GDEF
- The OpenType Feature Model
- GDEF: Glyph Class Definitions
- GSUB: Substitution Lookups and Ligatures
- GPOS: Positioning, Kerning and Marks
- Feature Tags and Application Behavior
Chapter 10: Variable Fonts: fvar, gvar, avar, HVAR, MVAR
- From Static Masters to Continuous Axes
- fvar: Named Instances and Axis Declaration
- gvar and HVAR: Variation Data
- avar: Axis Value Remapping
- MVAR, STAT and Metadata Tables
- How Variable Fonts Enable Continuous Design
Chapter 11: Text Input and Script Analysis
- From Keypress to Code Point Sequence
- Input Method Editors and IMEs
- Script Detection Algorithms
- Run Segmentation
- Preparation for Shaping
Chapter 12: Font Discovery, Selection and Fallback
- Where Fonts Live: System Paths and Directories
- Font Family Resolution
- Style, Weight and Width Matching
- Missing Glyphs and Fallback Chains
- Font Substitution Policies
Chapter 13: Text Shaping and Glyph Generation
- What Shaping Actually Does
- The Shaping Engine’s Input and Output
- Ligatures and Contextual Substitutions
- Combining Marks and Clusters
- Shaping for Complex Scripts
Chapter 14: Layout, Line Breaking and Bidirectional Text
- Line Breaking Algorithms and Soft Wraps
- Hard Wraps, Soft Wraps and Hyphenation
- The Unicode Bidirectional Algorithm
- Nested Embeddings and Isolates
- Justification and Paragraph Formatting
Chapter 15: Hinting, Rasterization and Anti-Aliasing
- Rasterization: From Outline to Pixel Grid
- Hinting: TrueType Instructions and the Autohinter
- Grayscale Anti-Aliasing
- Subpixel Rendering and ClearType
- Trade-Offs: Clarity vs Fidelity vs Performance
Chapter 16: Windows: GDI, DirectWrite and the Font Subsystem
- The Windows Font Subsystem Architecture
- GDI and Uniscribe: The Legacy Stack
- DirectWrite and Direct2D: The Modern Stack
- Font Installation, Caching and Registry
- DPI Awareness and Scaling
Chapter 17: macOS: Core Text, Core Graphics and ATS
- Historical Foundations: ATS and Adobe
- Core Text: APIs and Architecture
- Font Management and Locations
- Quartz Rendering and Color Management
- Integration with AppKit and WebKit
Chapter 18: Linux: Fontconfig, FreeType, HarfBuzz, Pango and Cairo
- The Composable Linux Stack
- Fontconfig: Discovery, Matching and Configuration
- FreeType: The Rasterization Engine
- HarfBuzz: The Shaping Engine
- Pango and Cairo: Layout and Drawing
Chapter 19: Web Typography: CSS, Web Fonts and Browser Engines
- CSS Font Properties and the Cascade
- Web Fonts: WOFF, WOFF2 and Delivery
- Browser Font Matching Algorithms
- Font Loading Behavior and FOUT/FOIT
- Layout Shifts and Performance
Chapter 20: Desktop and Application Typography
- GTK and Pango Integration
- Qt’s Text Rendering Architecture
- Electron and Cross-Platform Apps
- Game Engines and Custom Rendering
- Document Editors and Pagination
Chapter 21: Terminal Emulators and Console Rendering
- Monospace Requirements and Cell Grids
- Unicode and CJK in Terminals
- Ligatures in Terminal Emulators
- Terminal Implementations Compared
- Configuration and Customization
Chapter 22: GPU Acceleration, Color Fonts and Emerging Topics
- GPU-Accelerated Text Rendering
- Color Fonts and Emoji Rendering
- Font Subsetting and Delivery
- Security Considerations
- Future Directions
Chapter 23: Inspecting and Diagnosing Typography
- Font Inspection Tools by Platform
- Examining Binary Tables and Metadata
- Tracing Font Resolution
- Diagnosing Missing Glyphs and Bad Fallback
- Comparing Rendering Across Platforms
Chapter 24: Measuring, Profiling and Optimizing Typography
- Accurate Text Measurement
- Profiling Font Loading and Rendering
- Benchmark Methodologies
- Common Layout Bugs and Their Causes
- Optimization Strategies