Skip to main content

Crate vector_text

Crate vector_text 

Source
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:

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));

Enums§

BorlandFont
A specific Borland font instance (i.e., .CHR file).
HersheyFont
A specific Hershey font mapping file which defines a font in terms of symbol ranges (.hmp file).
VectorFont
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.