Expand description
vector-text is a library for drawing text to a vector output
using various vector-based fonts.
This can be used for drawing text to plotters, with laser displays, on XY oscilloscopes, or for other purposes!
The library supports no_std environments but requires an allocator.
Supported fonts include:
- BGI (Borland) fonts including
LITT.CHR, via vector_text_borland - Hershey fonts, via vector_text_hershey
- The NewStroke font, via vector_text_newstroke
This library provides the render_text function which you can use to render text, e.g.:
use vector_text::{render_text, VectorFont, HersheyFont};
let result = render_text("Hello World!", VectorFont::HersheyFont(HersheyFont::Romans));Structs§
- Point
- Representation of a point with higher range than PackedPoint. Used for the output of text rendering.
Enums§
- Borland
Font - A specific Borland font instance (i.e.,
.CHRfile). - Hershey
Font - A specific Hershey font mapping file which defines a font in terms of symbol ranges (
.hmpfile). - Vector
Font - A font using any of the supported vector font formats.
Functions§
- render_
text - Render the given text string to a list of points using the specified font.