pub struct Varc<'a> {
data: FontData<'a>,
}Expand description
VARC (Variable Composites / Components Table)
Fields§
§data: FontData<'a>Implementations§
Source§impl<'a> Varc<'a>
impl<'a> Varc<'a>
pub const MIN_SIZE: usize
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a>>( &self, offset: O, ) -> Result<R, ReadError>
Resolve the provided offset from the start of this table.
Sourcepub fn offset_data(&self) -> FontData<'a>
pub fn offset_data(&self) -> FontData<'a>
Return a reference to this table’s raw data.
We use this in the compile crate to resolve offsets.
Sourcepub fn shape(&self) -> &Self
👎Deprecated: just use the base type directly
pub fn shape(&self) -> &Self
Return a reference to the table’s ‘Shape’ struct.
This is a low level implementation detail, but it can be useful in some cases where you want to know things about a table’s layout, such as the byte offsets of specific fields.
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major/minor version number. Set to 1.0.
pub fn coverage_offset(&self) -> Offset32
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset.
pub fn multi_var_store_offset(&self) -> Nullable<Offset32>
Sourcepub fn multi_var_store(
&self,
) -> Option<Result<MultiItemVariationStore<'a>, ReadError>>
pub fn multi_var_store( &self, ) -> Option<Result<MultiItemVariationStore<'a>, ReadError>>
Attempt to resolve multi_var_store_offset.
pub fn condition_list_offset(&self) -> Nullable<Offset32>
Sourcepub fn condition_list(&self) -> Option<Result<ConditionList<'a>, ReadError>>
pub fn condition_list(&self) -> Option<Result<ConditionList<'a>, ReadError>>
Attempt to resolve condition_list_offset.
pub fn axis_indices_list_offset(&self) -> Nullable<Offset32>
Sourcepub fn axis_indices_list(&self) -> Option<Result<Index2<'a>, ReadError>>
pub fn axis_indices_list(&self) -> Option<Result<Index2<'a>, ReadError>>
Attempt to resolve axis_indices_list_offset.
pub fn var_composite_glyphs_offset(&self) -> Offset32
Sourcepub fn var_composite_glyphs(&self) -> Result<Index2<'a>, ReadError>
pub fn var_composite_glyphs(&self) -> Result<Index2<'a>, ReadError>
Attempt to resolve var_composite_glyphs_offset.
pub fn version_byte_range(&self) -> Range<usize> ⓘ
pub fn coverage_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn multi_var_store_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn condition_list_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn axis_indices_list_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn var_composite_glyphs_offset_byte_range(&self) -> Range<usize> ⓘ
Source§impl Varc<'_>
impl Varc<'_>
Sourcepub fn axis_indices(&self, nth: usize) -> Result<PackedDeltas<'_>, ReadError>
pub fn axis_indices(&self, nth: usize) -> Result<PackedDeltas<'_>, ReadError>
Friendlier accessor than directly using raw data via Index2
Trait Implementations§
Source§impl<'a> MinByteRange<'a> for Varc<'a>
impl<'a> MinByteRange<'a> for Varc<'a>
Auto Trait Implementations§
impl<'a> Freeze for Varc<'a>
impl<'a> RefUnwindSafe for Varc<'a>
impl<'a> Send for Varc<'a>
impl<'a> Sync for Varc<'a>
impl<'a> Unpin for Varc<'a>
impl<'a> UnsafeUnpin for Varc<'a>
impl<'a> UnwindSafe for Varc<'a>
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