#vulkan #text #raster #shaper

ilmenite

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

10 releases (6 breaking)

new 0.6.0 Aug 2, 2021
0.5.1 Jul 30, 2021
0.4.1 Jul 20, 2021
0.3.0 May 29, 2021
0.0.0 Dec 15, 2019

#121 in GUI

Download history 22/week @ 2021-04-14 9/week @ 2021-04-21 8/week @ 2021-04-28 6/week @ 2021-05-05 9/week @ 2021-05-12 5/week @ 2021-05-19 18/week @ 2021-05-26 7/week @ 2021-06-02 12/week @ 2021-06-09 2/week @ 2021-06-16 4/week @ 2021-06-23 24/week @ 2021-06-30 11/week @ 2021-07-07 21/week @ 2021-07-14 20/week @ 2021-07-21 74/week @ 2021-07-28

62 downloads per month
Used in basalt

MIT license

95KB
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

~44MB
~1M SLoC