pub enum FontInstance {
Default,
Normalized(Vec<i16>),
User(Vec<AxisValue>),
}Expand description
The instance of a variable face a glyph run is drawn at.
use pdfrum_edit::{AxisValue, FontInstance};
let bold = FontInstance::User(vec![AxisValue { tag: *b"wght", value: 700.0 }]);
assert_ne!(bold, FontInstance::Default);Variants§
Default
The face as stored: its default instance, or a static face.
Normalized(Vec<i16>)
Normalized coordinates, one F2Dot14 per fvar axis in the face’s own
order, after avar: what a shaper or rasteriser holds.
User(Vec<AxisValue>)
User-space axis values; an axis not named stays at its default.
Trait Implementations§
Source§impl Clone for FontInstance
impl Clone for FontInstance
Source§impl Debug for FontInstance
impl Debug for FontInstance
Source§impl Default for FontInstance
impl Default for FontInstance
Source§impl PartialEq for FontInstance
impl PartialEq for FontInstance
impl StructuralPartialEq for FontInstance
Auto Trait Implementations§
impl Freeze for FontInstance
impl RefUnwindSafe for FontInstance
impl Send for FontInstance
impl Sync for FontInstance
impl Unpin for FontInstance
impl UnsafeUnpin for FontInstance
impl UnwindSafe for FontInstance
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<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.