[−][src]Struct directwrite::descriptions::FontFeature
Specifies properties used to identify and execute typographic features in the current font face.
Remarks
The OpenType standard provides access to typographic features available in the font by means of a feature tag with the associated parameters. The OpenType feature tag is a 4-byte identifier of the registered name of a feature. For example, the 'kern' feature name tag is used to identify the 'Kerning' feature in OpenType font. Similarly, the OpenType feature tag for 'Standard Ligatures' and 'Fractions' is 'liga' and 'frac' respectively. Since a single run can be associated with more than one typographic features, the Text String API accepts typographic settings for a run as a list of features and are executed in the order they are specified.
The value of the tag member represents the OpenType name tag of the feature, while the param value represents additional parameter for the execution of the feature referred by the tag member. Both nameTag and parameter are stored as little endian, the same convention followed by GDI. Most features treat the Param value as a binary value that indicates whether to turn the execution of the feature on or off, with it being off by default in the majority of cases. Some features, however, treat this value as an integral value representing the integer index to the list of alternate results it may produce during the execution; for instance, the feature 'Stylistic Alternates' or 'salt' uses the parameter value as an index to the list of alternate substituting glyphs it could produce for a specified glyph.
Fields
name_tag: FontFeatureTag
The feature's OpenType name identifier.
parameter: u32
The execution parameter of the feature.
A non-zero value generally enables the feature execution, while the zero value disables it. A feature requiring a selector uses this value to indicate the selector index.
Trait Implementations
impl Clone for FontFeature
[src]
fn clone(&self) -> FontFeature
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<FontFeature> for FontFeature
[src]
fn eq(&self, other: &FontFeature) -> bool
[src]
fn ne(&self, other: &FontFeature) -> bool
[src]
impl PartialOrd<FontFeature> for FontFeature
[src]
fn partial_cmp(&self, other: &FontFeature) -> Option<Ordering>
[src]
fn lt(&self, other: &FontFeature) -> bool
[src]
fn le(&self, other: &FontFeature) -> bool
[src]
fn gt(&self, other: &FontFeature) -> bool
[src]
fn ge(&self, other: &FontFeature) -> bool
[src]
impl Eq for FontFeature
[src]
impl Ord for FontFeature
[src]
fn cmp(&self, other: &FontFeature) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Copy for FontFeature
[src]
impl From<FontFeature> for DWRITE_FONT_FEATURE
[src]
fn from(feature: FontFeature) -> DWRITE_FONT_FEATURE
[src]
impl From<DWRITE_FONT_FEATURE> for FontFeature
[src]
fn from(feature: DWRITE_FONT_FEATURE) -> FontFeature
[src]
impl Hash for FontFeature
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for FontFeature
[src]
Auto Trait Implementations
impl Send for FontFeature
impl Sync for FontFeature
Blanket Implementations
impl<T> FontKey for T where
T: Send + Sync + 'static + ?Sized,
[src]
T: Send + Sync + 'static + ?Sized,
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,