#glow #true-type #font #text

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

#22 in Data formats

Download history 727/week @ 2024-09-18 719/week @ 2024-09-25 575/week @ 2024-10-02 453/week @ 2024-10-09 490/week @ 2024-10-16 565/week @ 2024-10-23 655/week @ 2024-10-30 452/week @ 2024-11-06 535/week @ 2024-11-13 634/week @ 2024-11-20 675/week @ 2024-11-27 669/week @ 2024-12-04 964/week @ 2024-12-11 603/week @ 2024-12-18 319/week @ 2024-12-25 477/week @ 2025-01-01

2,488 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–6.5MB
~127K SLoC