pub struct BaseTable {
pub horizontal: Vec<BaseScript>,
pub vertical: Vec<BaseScript>,
}Expand description
A BaseTable represents the entire BASE table, with horizontal and vertical axes.
Fields§
§horizontal: Vec<BaseScript>The horizontal axis BaseScript records
vertical: Vec<BaseScript>The vertical axis BaseScript records
Implementations§
Source§impl BaseTable
impl BaseTable
Sourcepub fn to_skrifa(&self) -> Result<Base, AutobaseError>
pub fn to_skrifa(&self) -> Result<Base, AutobaseError>
Convert to a Skrifa Base representation for writing to a font.
Sourcepub fn from_skrifa(base: &Base<'_>) -> Result<Self, AutobaseError>
pub fn from_skrifa(base: &Base<'_>) -> Result<Self, AutobaseError>
Create a BaseTable from a Skrifa Base representation read from a font.
Sourcepub fn new(horizontal: Vec<BaseScript>, vertical: Vec<BaseScript>) -> Self
pub fn new(horizontal: Vec<BaseScript>, vertical: Vec<BaseScript>) -> Self
Create a new BASE table
Sourcepub fn add_to_binary(
&self,
font: &FontRef<'_>,
) -> Result<Vec<u8>, AutobaseError>
pub fn add_to_binary( &self, font: &FontRef<'_>, ) -> Result<Vec<u8>, AutobaseError>
Add the BASE table to a binary font, returning the new binary data.
pub fn merge(&mut self, other: &BaseTable, tolerance: Option<u16>)
pub fn simplify(&mut self, tolerance: Option<u16>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BaseTable
impl RefUnwindSafe for BaseTable
impl Send for BaseTable
impl Sync for BaseTable
impl Unpin for BaseTable
impl UnsafeUnpin for BaseTable
impl UnwindSafe for BaseTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for 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
Convert this type into
T, using the provided data to resolve any offsets.