mod glyph;
pub use glyph::TexturedGlyph;
mod glyph_cache;
pub use glyph_cache::GlyphCache;
mod font;
pub use font::{
FontOwner,
FaceWrapper,
CachedFont,
};
pub use ttf_parser;
#[derive(Clone,Copy,Debug)]
pub struct Scale{
pub horizontal:f32,
pub vertical:f32,
}
impl Scale{
pub fn new(h:f32,v:f32)->Scale{
Self{
horizontal:h,
vertical:v
}
}
}
impl std::ops::Div for Scale{
type Output=Scale;
fn div(self,rhs:Scale)->Scale{
Self{
horizontal:self.horizontal/rhs.horizontal,
vertical:self.vertical/rhs.vertical,
}
}
}
impl std::ops::Mul for Scale{
type Output=Scale;
fn mul(self,rhs:Scale)->Scale{
Self{
horizontal:self.horizontal*rhs.horizontal,
vertical:self.vertical*rhs.vertical,
}
}
}