pub struct FontFeature {
pub tag: String,
pub value: i32,
pub start: i32,
pub end: i32,
}Expand description
Font feature.
Fields§
§tag: StringGets or sets the tag.
value: i32Gets or sets the value.
start: i32Gets or sets the start.
end: i32Gets or sets the end.
Implementations§
Source§impl FontFeature
impl FontFeature
Sourcepub fn parse(s: &str) -> FontFeature
pub fn parse(s: &str) -> FontFeature
Parses a string to return a FontFeature.
Syntax is the following:
- Syntax — Value — Start — End
kern— 1 — 0 — ∞ — Turn feature on+kern— 1 — 0 — ∞ — Turn feature on-kern— 0 — 0 — ∞ — Turn feature offkern=0— 0 — 0 — ∞ — Turn feature offkern=1— 1 — 0 — ∞ — Turn feature onaalt=2— 2 — 0 — ∞ — Choose 2nd alternatekern[]— 1 — 0 — ∞ — Turn feature onkern[:]— 1 — 0 — ∞ — Turn feature onkern[5:]— 1 — 5 — ∞ — Turn feature on, partialkern[:5]— 1 — 0 — 5 — Turn feature on, partialkern[3:5]— 1 — 3 — 5 — Turn feature on, rangekern[3]— 1 — 3 — 3+1 — Turn feature on, single charaalt[3:5]=2— 2 — 3 — 5 — Turn 2nd alternate on for range
A string that does not match gives the default (empty tag) feature.
Trait Implementations§
Source§impl Clone for FontFeature
impl Clone for FontFeature
Source§impl Debug for FontFeature
impl Debug for FontFeature
Source§impl Display for FontFeature
Gets a string representation of the FontFeature.
impl Display for FontFeature
Gets a string representation of the FontFeature.
impl Eq for FontFeature
Source§impl FromIterator<FontFeature> for FontFeatureCollection
impl FromIterator<FontFeature> for FontFeatureCollection
Source§fn from_iter<I: IntoIterator<Item = FontFeature>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = FontFeature>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl FromStr for FontFeature
impl FromStr for FontFeature
Source§impl Hash for FontFeature
impl Hash for FontFeature
Source§impl MarkupTyped for FontFeature
impl MarkupTyped for FontFeature
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
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> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more