pub fn base_font_metrics(&self) -> Option<FontMetrics> {
        let font = self.ttf_font();

        // Result is 'None' if the font has no 'units_per_em' value, as that means we don't know how to scale this font
        Some(FontMetrics {
            em_size:            font.units_per_em()? as _,
            ascender:           font.ascender() as _,
            descender:          font.descender() as _,
            height:             font.height() as _,
            line_gap:           font.line_gap() as _,
            capital_height:     font.capital_height().map(|h| h as _),
            underline_position: font.underline_metrics().map(|pos| FontLinePosition { offset: pos.position as _, thickness: pos.thickness as _}),
            strikeout_position: font.strikeout_metrics().map(|pos| FontLinePosition { offset: pos.position as _, thickness: pos.thickness as _}),
        })
    }
///
/// Retrieves the base font metrics for this font (None if they can't be determined for this font)
///
Retrieves the base font metrics for this font (None if they can't be determined for this font)
Retrieves the base font metrics for this font ( None if they can ' t be determined for this font )
pub fn base_font_metrics(&self) -> Option<FontMetrics> {
        let font = self.ttf_font();
        // Result is 'None' if the font has no 'units_per_em' value, as that means we don't know how to scale this font
        Some(FontMetrics {
            em_size:            font.units_per_em()? as _,
            ascender:           font.ascender() as _,
            descender:          font.descender() as _,
            height:             font.height() as _,
            line_gap:           font.line_gap() as _,
            capital_height:     font.capital_height().map(|h| h as _),
            underline_position: font.underline_metrics().map(|pos| FontLinePosition { offset: pos.position as _, thickness: pos.thickness as _}),
            strikeout_position: font.strikeout_metrics().map(|pos| FontLinePosition { offset: pos.position as _, thickness: pos.thickness as _}),
        })
    }
pub fn base_font_metrics ( & self ) -> Option < FontMetrics > { let font = self . ttf_font ( ) ; // Result is 'None' if the font has no 'units_per_em' value, as that means we don't know how to scale this font Some ( FontMetrics { em_size : font . units_per_em ( ) ? as _ , ascender : font . ascender ( ) as _ , descender : font . descender ( ) as _ , height : font . height ( ) as _ , line_gap : font . line_gap ( ) as _ , capital_height : font . capital_height ( ) . map ( | h | h as _ ) , underline_position : font . underline_metrics ( ) . map ( | pos | FontLinePosition { offset : pos . position as _ , thickness : pos . thickness as _ } ) , strikeout_position : font . strikeout_metrics ( ) . map ( | pos | FontLinePosition { offset : pos . position as _ , thickness : pos . thickness as _ } ) , } ) }
Retrieves the base font metrics for this font (None if they can't be determined for this font)
Retrieves the base font metrics for this font ( None if they can ' t be determined for this font )
&self