Struct zng_ext_font::font_features::FontVariations
source · pub struct FontVariations(/* private fields */);
Expand description
A small map of font variations.
Use font_variations!
to manually initialize.
Implementations§
source§impl FontVariations
impl FontVariations
sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
New empty with pre-allocated capacity.
sourcepub fn from_pairs(pairs: &[(FontVariationName, f32)]) -> Self
pub fn from_pairs(pairs: &[(FontVariationName, f32)]) -> Self
New font variations from pairs of name, value.
sourcepub fn insert(&mut self, name: FontVariationName, value: f32) -> Option<f32>
pub fn insert(&mut self, name: FontVariationName, value: f32) -> Option<f32>
Insert the font variation, returns the previous value if the variation was already set.
sourcepub fn remove(&mut self, name: FontVariationName) -> Option<f32>
pub fn remove(&mut self, name: FontVariationName) -> Option<f32>
Remove the font variation, returns the value if the variation was set.
sourcepub fn contains(&self, name: FontVariationName) -> bool
pub fn contains(&self, name: FontVariationName) -> bool
If the variation is set.
sourcepub fn get(&self, name: FontVariationName) -> Option<f32>
pub fn get(&self, name: FontVariationName) -> Option<f32>
Gets a copy of the variation value if it is set.
sourcepub fn get_mut(&mut self, name: FontVariationName) -> Option<&mut f32>
pub fn get_mut(&mut self, name: FontVariationName) -> Option<&mut f32>
Exclusive borrow the variation value if it is set.
sourcepub fn finalize(&self) -> RFontVariations
pub fn finalize(&self) -> RFontVariations
Finalize variations config for use in a font.
Trait Implementations§
source§impl Clone for FontVariations
impl Clone for FontVariations
source§fn clone(&self) -> FontVariations
fn clone(&self) -> FontVariations
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FontVariations
impl Debug for FontVariations
source§impl Default for FontVariations
impl Default for FontVariations
source§fn default() -> FontVariations
fn default() -> FontVariations
Returns the “default value” for a type. Read more
source§impl PartialEq for FontVariations
impl PartialEq for FontVariations
impl StructuralPartialEq for FontVariations
Auto Trait Implementations§
impl Freeze for FontVariations
impl RefUnwindSafe for FontVariations
impl Send for FontVariations
impl Sync for FontVariations
impl Unpin for FontVariations
impl UnwindSafe for FontVariations
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Access to mut
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
Clone the value.
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
Clone the value into a new boxed
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self
equals other
.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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more