Skip to main content

Crate titanf

Crate titanf 

Source
Expand description

§TitanF

TitanF is a blazingly fast, dependency-free font rasterizer written in pure Rust.

  • 🚀 Fast
  • 📦 Zero dependencies
  • ⚙️ no_std compatible (requires alloc)
  • 🎨 Subpixel anti-aliasing
  • 🦀 Safe, stable Rust (no unsafe)
use titanf::TrueTypeFont;

let font_data = include_bytes!("../Roboto-Medium.ttf");
let mut font = TrueTypeFont::load_font(font_data).unwrap();

let (metrics, bitmap) = font.get_char::<false>('A', 16.0);
//                                      ^^^^^ turn caching on/off

§See Also

Re-exports§

pub use crate::font::TrueTypeFont;

Modules§

cache
Caching mechanisms
font
rasterizer
Glyph rasterization and scanline algorithms
render
Rendering utilities
tables
TrueType table structures (CMAP, GLYF, etc.)

Traits§

F32NoStd
A no_std replacement for common f32 methods