pub struct MasterAxis {
name: Option<String>,
design_points: Vec<i32>,
blend_points: Vec<Fixed>,
}Expand description
One axis of a multiple master font.
Fields§
§name: Option<String>§design_points: Vec<i32>§blend_points: Vec<Fixed>Implementations§
Source§impl MasterAxis
impl MasterAxis
Sourcepub fn min_design(&self) -> i32
pub fn min_design(&self) -> i32
Returns the lowest design coordinate.
Sourcepub fn max_design(&self) -> i32
pub fn max_design(&self) -> i32
Returns the highest design coordinate.
Sourcepub fn design_map(&self) -> impl Iterator<Item = (i32, Fixed)> + '_
pub fn design_map(&self) -> impl Iterator<Item = (i32, Fixed)> + '_
Returns the map from design coordinates to blend coordinates, as pairs in the font’s order.
Sourcepub fn design_to_blend(&self, design: i32) -> Fixed
pub fn design_to_blend(&self, design: i32) -> Fixed
Returns the blend coordinate for a design coordinate.
This follows FreeType’s T1_Set_MM_Design, which interpolates
between two points as though the first mapped to a blend of zero.
The result is exact for a map whose interpolated points start at
zero, as two point maps do.
Sourcepub fn blend_to_design(&self, blend: Fixed) -> i32
pub fn blend_to_design(&self, blend: Fixed) -> i32
Returns the design coordinate for a blend coordinate, a whole number.
Trait Implementations§
Source§impl Clone for MasterAxis
impl Clone for MasterAxis
Source§fn clone(&self) -> MasterAxis
fn clone(&self) -> MasterAxis
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MasterAxis
impl RefUnwindSafe for MasterAxis
impl Send for MasterAxis
impl Sync for MasterAxis
impl Unpin for MasterAxis
impl UnsafeUnpin for MasterAxis
impl UnwindSafe for MasterAxis
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