pub struct FeatureBuilder<'a> { /* private fields */ }
Expand description
A structure that allows client code to add additional features to the compilation.
Implementations§
Source§impl<'a> FeatureBuilder<'a>
impl<'a> FeatureBuilder<'a>
Sourcepub fn language_systems(&self) -> impl Iterator<Item = LanguageSystem> + 'a
pub fn language_systems(&self) -> impl Iterator<Item = LanguageSystem> + 'a
An iterator over the default language systems registered in the FEA
Sourcepub fn gdef(&self) -> Option<&GdefBuilder>
pub fn gdef(&self) -> Option<&GdefBuilder>
If the FEA text contained an explicit GDEF table block, return its contents
Sourcepub fn add_lig_carets(
&mut self,
lig_carets: BTreeMap<GlyphId16, Vec<CaretValue>>,
)
pub fn add_lig_carets( &mut self, lig_carets: BTreeMap<GlyphId16, Vec<CaretValue>>, )
Add caret positions for the GDEF LigCaretList
table
Sourcepub fn add_lookup<T: LookupSubtableBuilder>(
&mut self,
lookup: PendingLookup<T>,
) -> LookupId
pub fn add_lookup<T: LookupSubtableBuilder>( &mut self, lookup: PendingLookup<T>, ) -> LookupId
Add a lookup to the lookup list.
The LookupId
that is returned can then be included in features (i.e,
passed to add_feature
.)
Sourcepub fn add_to_default_language_systems(
&mut self,
feature_tag: Tag,
lookups: &[LookupId],
)
pub fn add_to_default_language_systems( &mut self, feature_tag: Tag, lookups: &[LookupId], )
Add lookups to every default language system.
Convenience method for recurring pattern.
Sourcepub fn add_feature(&mut self, key: FeatureKey, lookups: Vec<LookupId>)
pub fn add_feature(&mut self, key: FeatureKey, lookups: Vec<LookupId>)
Create a new feature, registered for a particular language system.
The caller must call this method once for each language system under which a feature is to be registered.
Sourcepub fn add_feature_variations(
&mut self,
features: Vec<Tag>,
conditions: Vec<(ConditionSet, Vec<LookupId>)>,
)
pub fn add_feature_variations( &mut self, features: Vec<Tag>, conditions: Vec<(ConditionSet, Vec<LookupId>)>, )
Add feature variations.
The variations will be added to each feature in tags
.
For each feature tag:
- if any
FeatureRecord
s exist with that tag, the variations will be added to them. - if none exist, a new feature will be registered for the default language systems, and the variations will be added to these features.
Auto Trait Implementations§
impl<'a> Freeze for FeatureBuilder<'a>
impl<'a> RefUnwindSafe for FeatureBuilder<'a>
impl<'a> !Send for FeatureBuilder<'a>
impl<'a> !Sync for FeatureBuilder<'a>
impl<'a> Unpin for FeatureBuilder<'a>
impl<'a> !UnwindSafe for FeatureBuilder<'a>
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
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T
, using the provided data to resolve any offsets.