#[repr(C)]pub struct StyleMetrics<'a> {
pub text_style: &'a TextStyle,
pub font_metrics: FontMetrics,
}
Fields§
§text_style: &'a TextStyle
§font_metrics: FontMetrics
FontMetrics
contains the following metrics:
- Top distance to reserve above baseline
- Ascent distance to reserve below baseline
- Descent extent below baseline
- Bottom extent below baseline
- Leading distance to add between lines
- AvgCharWidth average character width
- MaxCharWidth maximum character width
- XMin minimum x
- XMax maximum x
- XHeight height of lower-case ‘x’
- CapHeight height of an upper-case letter
- UnderlineThickness underline thickness
- UnderlinePosition underline position relative to baseline
- StrikeoutThickness strikeout thickness
- StrikeoutPosition strikeout position relative to baseline
Implementations§
Source§impl<'a> StyleMetrics<'a>
impl<'a> StyleMetrics<'a>
Trait Implementations§
Source§impl<'a> Clone for StyleMetrics<'a>
impl<'a> Clone for StyleMetrics<'a>
Source§fn clone(&self) -> StyleMetrics<'a>
fn clone(&self) -> StyleMetrics<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for StyleMetrics<'a>
impl<'a> !RefUnwindSafe for StyleMetrics<'a>
impl<'a> Send for StyleMetrics<'a>
impl<'a> Sync for StyleMetrics<'a>
impl<'a> Unpin for StyleMetrics<'a>
impl<'a> !UnwindSafe for StyleMetrics<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more