| Crates.io | skia-rs-text |
| lib.rs | skia-rs-text |
| version | 0.2.0 |
| created_at | 2026-01-02 20:26:12.109301+00 |
| updated_at | 2026-01-03 18:45:47.472043+00 |
| description | Text layout and rendering for skia-rs |
| homepage | https://github.com/pegasusheavy/skia-rs |
| repository | https://github.com/pegasusheavy/skia-rs |
| max_upload_size | |
| id | 2019163 |
| size | 88,377 |
Text layout and rendering for skia-rs, a pure Rust implementation of the Skia 2D graphics library.
use skia_rs_text::{Font, Typeface, TextBlobBuilder};
// Create a font
let typeface = Typeface::default_typeface();
let font = Font::new(typeface, 24.0);
// Shape text into glyphs
let glyphs = font.text_to_glyphs("Hello, world!");
// Build a text blob
let mut builder = TextBlobBuilder::new();
builder.alloc_run(&font, glyphs.len(), 0.0, 0.0);
let blob = builder.build();
// Draw with canvas
canvas.draw_text_blob(&blob, 100.0, 100.0, &paint);
MIT OR Apache-2.0
See the main repository for more information.