Function mterm::load_font_image [−][src]
pub fn load_font_image(data: &[u8], format: ImageFormat) -> Result<FontData>
Expand description
Load a font from a given image in a byte array and generate a FontData structure.
Arguments
- data - byte array that contains the image data. You can use the
include_bytes!
macro to generate this from a file at compile time. - format - The image::ImageFormat enum that declares the file format the image data is in.
Notes
This function will assume that the image contains 256 characters in a 16x16 grid of equally sized cells.