[−][src]Crate riddle_font
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::new(&ttf_bytes[..])?; // Render the loaded font to a Riddle image let image = font.render_simple("Simple String", 24)?;
Structs
TTFont | Represents a parsed TTF file, and facilitates simple rendering |
Enums
FontError |