#glow #true-type #font #text

glow_glyph

A fast text renderer for glow, powered by glyph_brush

8 releases (5 breaking)

0.5.1 May 10, 2022
0.5.0 Dec 17, 2021
0.4.0 Nov 10, 2020
0.3.0 Jul 27, 2020
0.0.0 May 21, 2020

#49 in Data formats

Download history 630/week @ 2023-11-29 900/week @ 2023-12-06 936/week @ 2023-12-13 587/week @ 2023-12-20 440/week @ 2023-12-27 432/week @ 2024-01-03 765/week @ 2024-01-10 709/week @ 2024-01-17 697/week @ 2024-01-24 492/week @ 2024-01-31 598/week @ 2024-02-07 649/week @ 2024-02-14 905/week @ 2024-02-21 947/week @ 2024-02-28 796/week @ 2024-03-06 658/week @ 2024-03-13

3,378 downloads per month
Used in 19 crates (via iced_glow)

MIT license

75KB
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–5.5MB
~112K SLoC