#font #ttf #truetype #glow #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

#164 in Caching

Download history 2944/week @ 2023-05-31 2345/week @ 2023-06-07 1682/week @ 2023-06-14 2046/week @ 2023-06-21 1631/week @ 2023-06-28 1710/week @ 2023-07-05 2151/week @ 2023-07-12 2012/week @ 2023-07-19 2176/week @ 2023-07-26 1400/week @ 2023-08-02 1160/week @ 2023-08-09 1098/week @ 2023-08-16 1239/week @ 2023-08-23 947/week @ 2023-08-30 979/week @ 2023-09-06 623/week @ 2023-09-13

3,974 downloads per month
Used in 18 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

~3.5–5.5MB
~111K SLoC