pub struct FontFeature {
pub tag: [u8; 4],
pub value: u32,
}Expand description
One OpenType feature and its value. Compose’s TextStyle.fontFeatureSettings entry,
CSS’s font-feature-settings entry.
The tag is four bytes rather than a string so that a tag of the wrong length does not compile. Each byte has to be printable ASCII (0x20 to 0x7E); anything else is a protocol error on the Renderer’s side, and the text is drawn without features.
Fields§
§tag: [u8; 4]§value: u32Implementations§
Source§impl FontFeature
impl FontFeature
Sourcepub const TABULAR_NUMS: Self
pub const TABULAR_NUMS: Self
Digits of one width, so a number that changes does not move the ones beside it.
Sourcepub const PROPORTIONAL_NUMS: Self
pub const PROPORTIONAL_NUMS: Self
Digits of their own widths, as a text face usually sets them.
Sourcepub const NO_LIGATURES: Self
pub const NO_LIGATURES: Self
Standard ligatures turned off, so fi stays two letters.
Sourcepub const SLASHED_ZERO: Self
pub const SLASHED_ZERO: Self
A zero with a slash or a dot through it, where the font has one.
Trait Implementations§
Source§impl Clone for FontFeature
impl Clone for FontFeature
impl Copy for FontFeature
Source§impl Debug for FontFeature
impl Debug for FontFeature
impl Eq for FontFeature
Source§impl Hash for FontFeature
impl Hash for FontFeature
Source§impl PartialEq for FontFeature
impl PartialEq for FontFeature
impl StructuralPartialEq for FontFeature
Auto Trait Implementations§
impl Forget for FontFeature
impl Freeze for FontFeature
impl Move for FontFeature
impl RefUnwindSafe for FontFeature
impl Send for FontFeature
impl Sync for FontFeature
impl Unpin for FontFeature
impl UnsafeUnpin for FontFeature
impl UnwindSafe for FontFeature
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