#glow #true-type-font #font

glow_glyph

A fast text renderer for glow, powered by glyph_brush

10 releases (breaking)

0.7.0 May 19, 2024
0.5.1 May 10, 2022
0.5.0 Dec 17, 2021
0.4.0 Nov 10, 2020
0.3.0 Jul 27, 2020

#356 in Graphics APIs

Download history 897/week @ 2024-12-13 437/week @ 2024-12-20 373/week @ 2024-12-27 669/week @ 2025-01-03 947/week @ 2025-01-10 815/week @ 2025-01-17 623/week @ 2025-01-24 906/week @ 2025-01-31 1226/week @ 2025-02-07 759/week @ 2025-02-14 800/week @ 2025-02-21 813/week @ 2025-02-28 815/week @ 2025-03-07 1098/week @ 2025-03-14 943/week @ 2025-03-21 525/week @ 2025-03-28

3,527 downloads per month
Used in 18 crates (via iced_glow)

MIT license

76KB
1.5K SLoC

glow_glyph

Integration status crates.io Documentation License

A fast text renderer for glow, powered by glyph_brush

use glow_glyph::{Section, GlyphBrushBuilder};

let font: &[u8] = include_bytes!("SomeFont.ttf");
let mut glyph_brush = GlyphBrushBuilder::using_font_bytes(font)
    .expect("Load font")
    .build(&glow_context);

let section = Section {
    text: "Hello glow_glyph",
    ..Section::default() // color, position, etc
};

glyph_brush.queue(section);
glyph_brush.queue(some_other_section);

glyph_brush.draw_queued(
    &glow_context,
    window_width,
    window_height,
);

Examples

Have a look at

  • cargo run --example hello
  • cargo run --example clipping

Dependencies

~4–6MB
~125K SLoC