pub struct Size(/* private fields */);
Expand description
Font size in pixels per em units.
Sizes in this crate are represented as a ratio of pixels to the size of
the em square defined by the font. This is equivalent to the px
unit
in CSS (assuming a DPI scale factor of 1.0).
To retrieve metrics and outlines in font units, use the unscaled constructor on this type.
Implementations§
source§impl Size
impl Size
sourcepub fn new(ppem: f32) -> Self
pub fn new(ppem: f32) -> Self
Creates a new font size from the given value in pixels per em units.
sourcepub fn unscaled() -> Self
pub fn unscaled() -> Self
Creates a new font size for generating unscaled metrics or outlines in font units.
Trait Implementations§
source§impl From<Size> for DrawSettings<'_>
impl From<Size> for DrawSettings<'_>
source§impl PartialOrd for Size
impl PartialOrd for Size
impl Copy for Size
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)