pub struct FontFeature {
pub tag: [u8; 4],
pub value: u32,
}Expand description
An OpenType feature toggle applied during shaping.
tag is the 4-byte feature tag (e.g. *b"liga", *b"smcp",
*b"tnum", *b"ss01"); value is the feature value — 0 disables
it, 1 enables it, and some features (e.g. aalt) take an index.
Script-mandated features (Arabic joining, Indic reordering, etc.) always apply regardless of this list; these toggles control the discretionary typographic features a caller wants on or off.
Fields§
§tag: [u8; 4]The 4-byte OpenType feature tag.
value: u32Feature value: 0 = off, 1 = on, or a feature-specific index.
Implementations§
Trait Implementations§
Source§impl Clone for FontFeature
impl Clone for FontFeature
Source§fn clone(&self) -> FontFeature
fn clone(&self) -> FontFeature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl 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 Freeze 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