#raster #vulkan #text #graphics #shaper

ilmenite

A rust library for shaping, placing, and rasterizing text primarily for Basalt

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

#428 in GUI

23 downloads per month
Used in basalt

MIT license

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

~56MB
~1M SLoC