pub struct FontFlags(pub u32);Expand description
Typeface properties, from the font descriptor’s /Flags plus the corroborating entries.
A descriptor’s flags alone are unreliable — publisher toolchains routinely ship bold faces
with the bold bit clear and italic faces with a zero /ItalicAngle — so each accessor
corroborates the bit with the font’s weight, angle or name before answering.
Tuple Fields§
§0: u32Implementations§
Source§impl FontFlags
impl FontFlags
pub const FIXED_PITCH: u32
pub const SERIF: u32
pub const SYMBOLIC: u32
pub const CURSIVE: u32
pub const ITALIC: u32
pub const ALL_CAPS: u32
pub const SMALL_CAPS: u32
pub const BOLD: u32
Sourcepub const SANS_SERIF: u32
pub const SANS_SERIF: u32
Set when the descriptor’s nonsymbolic bit is set or the serif bit is clear; a font is
never both this and FontFlags::SERIF.
pub fn has(self, flag: u32) -> bool
pub fn is_bold(self) -> bool
pub fn is_italic(self) -> bool
pub fn is_serif(self) -> bool
pub fn is_fixed_pitch(self) -> bool
pub fn is_symbolic(self) -> bool
Trait Implementations§
impl Copy for FontFlags
impl Eq for FontFlags
impl StructuralPartialEq for FontFlags
Auto Trait Implementations§
impl Forget for FontFlags
impl Freeze for FontFlags
impl Move for FontFlags
impl RefUnwindSafe for FontFlags
impl Send for FontFlags
impl Sync for FontFlags
impl Unpin for FontFlags
impl UnsafeUnpin for FontFlags
impl UnwindSafe for FontFlags
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