wgpu_glyph

Build Status crates.io Documentation License

A fast text renderer for wgpu, powered by glyph_brush

```rust use gfx_glyph::{Section, GlyphBrushBuilder};

let font: &[u8] = includebytes!("SomeFont.ttf"); let mut glyphbrush = GlyphBrushBuilder::usingfontbytes(font) .build(&mut device, render_format);

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

glyphbrush.queue(section); glyphbrush.queue(someothersection);

glyphbrush.drawqueued( &mut device, &mut encoder, &frame.view, frame.width.round() as u32, frame.height.round() as u32, );

device.get_queue().submit(&[encoder.finish()]); ```

Examples

Have a look at * cargo run --example hello --features wgpu/vulkan --release * Coffee, which uses wgpu_glyph to provide font rendering on the [wgpu graphics backend].