pub struct VariationCoords(SmallVec<[(Tag, f32); 2]>);Expand description
List of font variation coordinates by axis tag. If more than one coordinate for a given axis is provided, the last one added is used.
Tuple Fields§
§0: SmallVec<[(Tag, f32); 2]>Implementations§
Source§impl VariationCoords
impl VariationCoords
Sourcepub fn new<T: IntoTag>(values: impl IntoIterator<Item = (T, f32)>) -> Self
pub fn new<T: IntoTag>(values: impl IntoIterator<Item = (T, f32)>) -> Self
Create a list of variation coordinates from a sequence of (tag, value) pairs.
§Example:
use epaint::text::VariationCoords;
let coords = VariationCoords::new([
(b"wght", 500.0),
(b"wdth", 75.0),
]);pub fn clear(&mut self)
Trait Implementations§
Source§impl Clone for VariationCoords
impl Clone for VariationCoords
Source§fn clone(&self) -> VariationCoords
fn clone(&self) -> VariationCoords
Returns a duplicate 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 VariationCoords
impl Debug for VariationCoords
Source§impl Default for VariationCoords
impl Default for VariationCoords
Source§fn default() -> VariationCoords
fn default() -> VariationCoords
Returns the “default value” for a type. Read more
Source§impl Hash for VariationCoords
impl Hash for VariationCoords
Source§impl PartialEq for VariationCoords
impl PartialEq for VariationCoords
impl StructuralPartialEq for VariationCoords
Auto Trait Implementations§
impl Freeze for VariationCoords
impl RefUnwindSafe for VariationCoords
impl Send for VariationCoords
impl Sync for VariationCoords
impl Unpin for VariationCoords
impl UnwindSafe for VariationCoords
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
Mutably borrows from an owned value. Read more