#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

#446 in GUI

Download history 10/week @ 2024-03-10 58/week @ 2024-03-31 1/week @ 2024-04-07 1/week @ 2024-05-05 2/week @ 2024-05-12

92 downloads per month

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