Struct read_fonts::tables::gpos::ValueRecord
source · pub struct ValueRecord {
pub x_placement: Option<BigEndian<i16>>,
pub y_placement: Option<BigEndian<i16>>,
pub x_advance: Option<BigEndian<i16>>,
pub y_advance: Option<BigEndian<i16>>,
pub x_placement_device: BigEndian<Nullable<Offset16>>,
pub y_placement_device: BigEndian<Nullable<Offset16>>,
pub x_advance_device: BigEndian<Nullable<Offset16>>,
pub y_advance_device: BigEndian<Nullable<Offset16>>,
/* private fields */
}
Expand description
A Positioning ValueRecord.
NOTE: we create these manually, since parsing is weird and depends on the associated valueformat. That said, this isn’t a great representation? we could definitely do something much more in the zero-copy mode..
Fields§
§x_placement: Option<BigEndian<i16>>
§y_placement: Option<BigEndian<i16>>
§x_advance: Option<BigEndian<i16>>
§y_advance: Option<BigEndian<i16>>
§x_placement_device: BigEndian<Nullable<Offset16>>
§y_placement_device: BigEndian<Nullable<Offset16>>
§x_advance_device: BigEndian<Nullable<Offset16>>
§y_advance_device: BigEndian<Nullable<Offset16>>
Implementations§
source§impl ValueRecord
impl ValueRecord
pub fn read(data: FontData<'_>, format: ValueFormat) -> Result<Self, ReadError>
pub fn x_placement(&self) -> Option<i16>
pub fn y_placement(&self) -> Option<i16>
pub fn x_advance(&self) -> Option<i16>
pub fn y_advance(&self) -> Option<i16>
pub fn x_placement_device<'a>( &self, data: FontData<'a> ) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn y_placement_device<'a>( &self, data: FontData<'a> ) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn x_advance_device<'a>( &self, data: FontData<'a> ) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn y_advance_device<'a>( &self, data: FontData<'a> ) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
Trait Implementations§
source§impl Clone for ValueRecord
impl Clone for ValueRecord
source§fn clone(&self) -> ValueRecord
fn clone(&self) -> ValueRecord
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ComputeSize for ValueRecord
impl ComputeSize for ValueRecord
source§fn compute_size(args: &ValueFormat) -> usize
fn compute_size(args: &ValueFormat) -> usize
Compute the number of bytes required to represent this type.
source§impl Debug for ValueRecord
impl Debug for ValueRecord
source§impl Default for ValueRecord
impl Default for ValueRecord
source§fn default() -> ValueRecord
fn default() -> ValueRecord
Returns the “default value” for a type. Read more
source§impl<'a> FontReadWithArgs<'a> for ValueRecord
impl<'a> FontReadWithArgs<'a> for ValueRecord
source§impl PartialEq for ValueRecord
impl PartialEq for ValueRecord
source§impl ReadArgs for ValueRecord
impl ReadArgs for ValueRecord
type Args = ValueFormat
source§impl<'a> SomeRecord<'a> for ValueRecord
impl<'a> SomeRecord<'a> for ValueRecord
fn traverse(self, data: FontData<'a>) -> RecordResolver<'a>
impl Eq for ValueRecord
Auto Trait Implementations§
impl Freeze for ValueRecord
impl RefUnwindSafe for ValueRecord
impl Send for ValueRecord
impl Sync for ValueRecord
impl Unpin for ValueRecord
impl UnwindSafe for ValueRecord
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