18 releases (breaking)
0.14.0 | Apr 29, 2023 |
---|---|
0.13.0 | Oct 31, 2022 |
0.12.0 | Sep 18, 2022 |
0.11.0 | Jul 20, 2022 |
0.0.0 | Dec 15, 2019 |
#573 in GUI
92 downloads per month
94KB
2.5K
SLoC
Many features are incomplete. This crate is a WIP!
A rust library for shaping, placing, and rasterizing text primarily for Basalt.
let ilmenite = Ilmenite::new();
ilmenite.add_font(ImtFont::from_file(
"MyFont",
ImtWeight::Normal,
ImtRasterOps::default(),
device,
queue,
"MyFont.ttf"
).unwrap());
let glyphs = ilmenite.glyphs_for_text(
"MyFont",
ImtWeight::Normal,
12.0,
None,
"Hello World!"
).unwrap();
lib.rs
:
let ilmenite = Ilmenite::new();
ilmenite.add_font(
ImtFont::from_file(
"MyFont",
ImtWeight::Normal,
ImtRasterOpts::default(),
device,
queue,
"MyFont.ttf",
)
.unwrap(),
);
let glyphs = ilmenite
.glyphs_for_text("MyFont", ImtWeight::Normal, 12.0, None, "Hello World!")
.unwrap();
Dependencies
~55MB
~1M SLoC