Crate riddle_font[−][src]
Riddle crate for loading font files and rendering text to riddle_image images.
Built largely on the back of rusttype
and its dependencies.
Example
// Load font from TTF file let ttf_bytes = include_bytes!("../../example_assets/Roboto-Regular.ttf"); let font = TTFont::load(&ttf_bytes[..])?; // Render the loaded font to a Riddle image let image = font.render_simple("Simple String", 24)?;
Modules
rusttype_ext | Traits which expose underlying rusttype crates types |
Structs
TTFont | Represents a parsed TTF file, and facilitates simple rendering |
Enums
FontError |