pub struct AdjustedMetrics {
pub has_overlaps: bool,
pub lsb: Option<f32>,
pub advance_width: Option<f32>,
}Expand description
Information and adjusted metrics generated while drawing an outline glyph.
When applying hints to a TrueType glyph, the outline may be adjusted in the horizontal direction, affecting the left side bearing and advance width of the glyph. This captures those metrics.
Fields§
§has_overlaps: boolTrue if the underlying glyph contains flags indicating the presence of overlapping contours or components.
lsb: Option<f32>If present, an adjusted left side bearing value generated by the scaler.
This is equivalent to the horiBearingX value in
FT_Glyph_Metrics.
advance_width: Option<f32>If present, an adjusted advance width value generated by the scaler.
Note that, like FreeType, this value is always rounded when hinting
is requested even if the font does not contain any hinting
instructions. This might be relevant for CFF where the hinter never
adjusts outlines in the horizontal direction, in which case,
using the linear advance width from GlyphMetrics
may be desirable.
This is equivalent to the advance.x value in
FT_GlyphSlotRec.
Trait Implementations§
Source§impl Clone for AdjustedMetrics
impl Clone for AdjustedMetrics
Source§fn clone(&self) -> AdjustedMetrics
fn clone(&self) -> AdjustedMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more