use rusttype::PositionedGlyph;
use crate::geometry::{Orientation, Rectangle};
#[derive(Clone, Debug)]
pub struct GlyphData<'font> {
pub width: u32,
pub height: u32,
pub glyphs: Vec<PositionedGlyph<'font>>,
}
impl<'font> GlyphData<'font> {
pub fn bounding_box(&self, orientation: &Orientation) -> Rectangle {
match orientation {
Orientation::Horizontal => Rectangle::new(0, 0, self.width, self.height),
Orientation::Vertical => Rectangle::new(0, 0, self.height, self.width),
}
}
}