mod builtin;
mod characters;
mod font;
mod linebreak;
mod lines;
mod section;
mod words;
pub mod ab_glyph {
pub use ab_glyph::*;
}
pub use self::{builtin::*, font::*, linebreak::*, section::*};
use ::ab_glyph::*;
use std::hash::Hash;
pub trait GlyphPositioner: Hash {
fn calculate_glyphs<F, S>(
&self,
fonts: &[F],
geometry: &SectionGeometry,
sections: &[S],
) -> Vec<SectionGlyph>
where
F: Font,
S: ToSectionText;
fn bounds_rect(&self, geometry: &SectionGeometry) -> Rect;
fn recalculate_glyphs<F, S, P>(
&self,
previous: P,
change: GlyphChange,
fonts: &[F],
geometry: &SectionGeometry,
sections: &[S],
) -> Vec<SectionGlyph>
where
F: Font,
S: ToSectionText,
P: IntoIterator<Item = SectionGlyph>,
{
let _ = (previous, change);
self.calculate_glyphs(fonts, geometry, sections)
}
}
#[derive(Debug)]
#[non_exhaustive]
pub enum GlyphChange {
Geometry(SectionGeometry),
Unknown,
}