glow_glyph

Crates.ioglow_glyph
lib.rsglow_glyph
version0.7.0
sourcesrc
created_at2020-05-21 17:15:09.498321
updated_at2024-05-19 09:36:43.779023
descriptionA fast text renderer for glow, powered by glyph_brush
homepage
repositoryhttps://github.com/hecrj/glow_glyph
max_upload_size
id244213
size211,366
Héctor Ramón (hecrj)

documentation

https://docs.rs/glow_glyph

README

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
Commit count: 53

cargo fmt