Crate wgpu_text

Source
Expand description

wgpu-text is a wrapper over glyph-brush for simpler text rendering in wgpu.

This project was inspired by and is similar to wgpu_glyph, but has additional features and is more straightforward. Also, there is no need to include glyph-brush in your project.

Since the crate glyph-brush is reexported and heavily dependent on, it’s recommended to go through Section docs and Section examples for a better understanding of adding and managing text.

To learn about GPU texture caching, see caching behaviour

Look trough examples.

Re-exports§

pub use glyph_brush;

Structs§

BrushBuilder
Builder for TextBrush.
TextBrush
Wrapper over glyph_brush::GlyphBrush. In charge of drawing text.

Enums§

BrushError
Result of TextBrush errors and problems.

Functions§

ortho
Creates an orthographic matrix with given dimensions width and height.

Type Aliases§

Matrix
Represents a two-dimensional array matrix with 4x4 dimensions.