titanf-0.1.2 has been yanked.
TitanF
The font rasterizer that doesn't slow down
Quick Start
use TrueTypeFont;
Add to your Cargo.toml:
[]
= "0.1.1"
Why TitanF Is Fast
1. Smart Buffer Reuse
- Buffers allocated once per font instance
- Same-sized glyphs: just
memsetand reuse (near-zero cost) - Larger glyphs: grow buffer once, never shrink
- Result: Zero allocation overhead after warmup
2. Cache-Optimal Memory Layout
- Sequential memory access patterns
- No pointer chasing or indirection
- CPU prefetcher works perfectly
- Data stays hot in L1/L2 cache
3. Simple, Predictable Algorithm
- Winding number algorithm with single-pass filling
- No complex data structures
- Branch predictor loves it
- Compiler can optimize aggressively
Features
- 🚀 Blazingly Fast
- 📈 Linear Scaling — Performance doesn't "blow up" whether rendering 10 or 10 million glyphs
- 🦀 Zero Dependencies — Pure Rust, no external crates
- 📦
no_stdCompatible — Originally built for my own OS, it works fine in baremetal environments (just needsalloc) - 🎨 Subpixel Anti-aliasing — Smooth, high-quality glyph rendering
- 💯 Stable Rust — No nightly features, no unsafe code
- 🔧 Built-in TrueType Parser — Handles CMAP, GLYF, HEAD, HHEA, HMTX, KERN, LOCA, MAXP and keeps it dependency free
Benchmarking Notes
Hardware: All benchmarks run on the same machine with consistent methodology.
Methodology:
- Each rasterizer called with identical parameters
- Results wrapped in
black_box()to prevent optimization - Multiple runs averaged for consistency
- No caching enabled
Reproducibility: Benchmark code available in the repo. Run it yourself:
License
Licensed under the MIT License.
Contributing
Found a bug? Have a performance improvement? Contributions are welcome!
Please open an issue or PR on GitHub.