Files
minecraft-text-generator/crates/lib/src/font.rs

15 lines
351 B
Rust

/// Represents a single 2D character mapped to a boolean grid.
/// `true` means a block exists, `false` means empty space.
pub struct Glyph {
pub width: u32,
pub height: u32,
pub data: Vec<bool>,
}
pub trait FontProvider {
fn get_glyph(&self, character: char) -> Option<Glyph>;
fn letter_spacing(&self) -> u32 {
1
}
}