FontFeature
struct · ferroui-base · v0.5.0
struct FontFeature
Font feature.
Members
tag
tag: String
Gets or sets the tag.
value
value: i32
Gets or sets the value.
start
start: i32
Gets or sets the start.
end
end: i32
Gets or sets the end.
parse
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
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeResourceKeyObjectPropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEqEqHashDefaultFromStrDisplayFromIterator<FontFeature>MarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.