pub enum FontStyle {
Normal = 0,
Bold = 1_024,
Italic = 2_048,
BoldItalic = 3_072,
}Expand description
Font style variant encoded in glyph IDs.
Variants§
Normal = 0
Regular weight, upright style.
Bold = 1_024
Bold weight.
Italic = 2_048
Italic style.
BoldItalic = 3_072
Bold weight with italic style.
Implementations§
Source§impl FontStyle
impl FontStyle
Sourcepub fn from_u16(v: u16) -> Result<FontStyle, SerializationError>
pub fn from_u16(v: u16) -> Result<FontStyle, SerializationError>
§Errors
Returns SerializationError if v is not a valid font style value.
Sourcepub const fn style_mask(&self) -> u16
pub const fn style_mask(&self) -> u16
Returns the style bits for this font style, used to encode the style in the glyph ID.
Trait Implementations§
Source§impl Ord for FontStyle
impl Ord for FontStyle
Source§impl PartialOrd for FontStyle
impl PartialOrd for FontStyle
impl Copy for FontStyle
impl Eq 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