Trait gfx_glyph::GlyphPositioner
[−]
[src]
pub trait GlyphPositioner: Hash { fn calculate_glyphs<'a, G>(
&self,
font: &Font,
section: G
) -> Vec<PositionedGlyph>
where
G: Into<GlyphInfo<'a>>; fn bounds_rect<'a, G>(&self, section: G) -> Rect<f32>
where
G: Into<GlyphInfo<'a>>; }
Required Methods
fn calculate_glyphs<'a, G>(
&self,
font: &Font,
section: G
) -> Vec<PositionedGlyph> where
G: Into<GlyphInfo<'a>>,
&self,
font: &Font,
section: G
) -> Vec<PositionedGlyph> where
G: Into<GlyphInfo<'a>>,
Calculate a sequence of positioned glyphs to render. Custom implementations should always
return the same result when called with the same arguments. If not consider disabling
cache_glyph_positioning
.
fn bounds_rect<'a, G>(&self, section: G) -> Rect<f32> where
G: Into<GlyphInfo<'a>>,
G: Into<GlyphInfo<'a>>,
Return a rectangle according to the requested render position and bounds appropriate for the glyph layout.
Implementors
impl<L: LineBreaker> GlyphPositioner for Layout<L>