pub enum FontStyle {
Normal,
Italic,
Oblique(Option<ObliqueAngleRange>),
}Expand description
The style axis of a font face: upright, italic, or oblique.
Displays as a CSS font-style value: normal, italic, oblique, or
oblique followed by an angle or angle range (oblique 14deg,
oblique 20deg 40deg).
Variants§
Normal
Upright (normal) face.
Italic
Italic (italic) face.
Oblique(Option<ObliqueAngleRange>)
Slanted (oblique) face, with an optional slant angle or angle range.
None renders the bare oblique keyword, which CSS treats as
ObliqueAngle::DEFAULT.
Implementations§
Source§impl FontStyle
impl FontStyle
Sourcepub const fn oblique_angle(degrees: f32) -> Self
pub const fn oblique_angle(degrees: f32) -> Self
An oblique face slanted by a single angle in degrees
(CSS oblique 14deg).
§Panics
Panics if degrees is outside -90.0..=90.0.
Sourcepub const fn oblique_range(start: f32, end: f32) -> Self
pub const fn oblique_range(start: f32, end: f32) -> Self
An oblique face spanning a range of angles in degrees, as carried by a
variable font (CSS oblique 20deg 40deg).
§Panics
Panics if either value is outside -90.0..=90.0, or if end is before
start.
Trait Implementations§
impl Copy for FontStyle
impl StructuralPartialEq for FontStyle
Auto Trait Implementations§
impl Freeze for FontStyle
impl RefUnwindSafe for FontStyle
impl Send for FontStyle
impl Sync for FontStyle
impl Unpin for FontStyle
impl UnsafeUnpin for FontStyle
impl UnwindSafe for FontStyle
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