Skip to main content

RawBlend

Struct RawBlend 

Source
struct RawBlend {
    num_axes: usize,
    num_masters: usize,
    axis_names: Vec<String>,
    positions: bool,
    maps: Vec<Vec<(i32, Fixed)>>,
    weights: Vec<Fixed>,
    build_char_len: usize,
}
Expand description

The blend dictionaries of a font as they are read, before they are checked against each other.

Each add fails where FreeType refuses the whole font: a count out of range, a count that disagrees with one already read, or a second design map. A later axis type or position list replaces an earlier one, as in FreeType.

https://gitlab.freedesktop.org/freetype/freetype/-/blob/80a507a6b8e3d2906ad2c8ba69329bd2fb2a85ef/src/type1/t1load.c#L764

Fields§

§num_axes: usize§num_masters: usize§axis_names: Vec<String>§positions: bool§maps: Vec<Vec<(i32, Fixed)>>§weights: Vec<Fixed>§build_char_len: usize

Implementations§

Source§

impl RawBlend

Source

fn set_num_axes(&mut self, num_axes: usize) -> Option<()>

Source

fn set_num_masters(&mut self, num_masters: usize) -> Option<()>

Source

fn add_axis_types(&mut self, names: Vec<String>) -> Option<()>

Source

fn add_design_positions(&mut self, positions: Vec<Vec<Fixed>>) -> Option<()>

Source

fn add_design_maps(&mut self, maps: Vec<Vec<(i32, Fixed)>>) -> Option<()>

Source

fn add_weights(&mut self, weights: Vec<Fixed>) -> Option<()>

Source

fn finish(&self) -> Option<(MultipleMaster, Vec<Fixed>)>

Returns the design space and the default weights, or None where FreeType sets the blend aside and treats the font as an ordinary one.

https://gitlab.freedesktop.org/freetype/freetype/-/blob/80a507a6b8e3d2906ad2c8ba69329bd2fb2a85ef/src/type1/t1load.c#L2567

Trait Implementations§

Source§

impl Default for RawBlend

Source§

fn default() -> RawBlend

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.