skia-rs-text
Text layout and rendering for skia-rs, a pure Rust implementation of the Skia 2D graphics library.
Features
- Typeface: Font face abstraction
- Font: Font with size and style properties
- Text shaping: via rustybuzz integration
- TextBlob: Positioned glyph runs
- Paragraph: Rich text layout with styling
- Font manager: Font enumeration and matching
Usage
use ;
// Create a font
let typeface = default_typeface;
let font = new;
// Shape text into glyphs
let glyphs = font.text_to_glyphs;
// Build a text blob
let mut builder = new;
builder.alloc_run;
let blob = builder.build;
// Draw with canvas
canvas.draw_text_blob;
License
MIT OR Apache-2.0
See the main repository for more information.