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.

Some features are directly implemented from glyph-brush, so 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.

Modules

  • Contains all needed objects for font and glyph management. Directly taken from glyph_brush.
  • Contains all needed objects for inserting, styling and iterating text and glyphs. Directly taken from glyph_brush.

Structs

Functions

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

Type Definitions

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