1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// https://docs.microsoft.com/en-us/typography/opentype/spec/post use crate::{Font, LineMetrics}; impl<'a> Font<'a> { /// Parses font's underline metrics. /// /// Returns `None` when `post` table is not present. #[inline] pub fn underline_metrics(&self) -> Option<LineMetrics> { let table = self.post?; Some(LineMetrics { position: table.underline_position(), thickness: table.underline_thickness(), }) } }