pub struct MathValue {
pub value: i32,
pub delta_px: i32,
}Expand description
A MATH value read at a particular size.
The two fields are in different units and cannot simply be added: a device
table adjusts by whole pixels, so scaling its adjustment into design units
needs the units per em, which the MATH table does not know. A caller
working in font units wants value + delta_px * upem / ppem; one working
in pixels has the adjustment already.
Fields§
§value: i32The value as the font stores it, in design units.
delta_px: i32The adjustment the value’s device table makes at the requested size,
in pixels. Zero when there is no device table, when it does not cover
that size, or when the offset names a VariationIndex.
Trait Implementations§
impl Copy for MathValue
impl Eq for MathValue
impl StructuralPartialEq for MathValue
Auto Trait Implementations§
impl Freeze for MathValue
impl RefUnwindSafe for MathValue
impl Send for MathValue
impl Sync for MathValue
impl Unpin for MathValue
impl UnsafeUnpin for MathValue
impl UnwindSafe for MathValue
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