Initialize Minecraft text generator project with basic structure and CLI functionality
This commit is contained in:
14
crates/lib/src/font.rs
Normal file
14
crates/lib/src/font.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
/// 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user