pub struct MathVariants<'a> { /* private fields */ }Expand description
Implementations§
Source§impl<'a> MathVariants<'a>
impl<'a> MathVariants<'a>
pub const MIN_SIZE: usize
Sourcepub fn resolve_offset<O: Offset, R: FontRead<'a, Args = ()>>(
&self,
offset: O,
) -> Result<R, ReadError>
pub fn resolve_offset<O: Offset, R: FontRead<'a, Args = ()>>( &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
just use the base type directly
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 min_connector_overlap(&self) -> UfWord
pub fn min_connector_overlap(&self) -> UfWord
Minimum overlap of connecting glyphs during glyph construction, in design units.
Sourcepub fn vert_glyph_coverage_offset(&self) -> Nullable<Offset16>
pub fn vert_glyph_coverage_offset(&self) -> Nullable<Offset16>
Offset to the Coverage table for shapes growing in the vertical direction, from the beginning of the MathVariants table. May be NULL.
Sourcepub fn vert_glyph_coverage(
&self,
) -> Option<Result<CoverageTable<'a>, ReadError>>
pub fn vert_glyph_coverage( &self, ) -> Option<Result<CoverageTable<'a>, ReadError>>
Attempt to resolve vert_glyph_coverage_offset.
Sourcepub fn horiz_glyph_coverage_offset(&self) -> Nullable<Offset16>
pub fn horiz_glyph_coverage_offset(&self) -> Nullable<Offset16>
Offset to the Coverage table for shapes growing in the horizontal direction, from the beginning of the MathVariants table. May be NULL.
Sourcepub fn horiz_glyph_coverage(
&self,
) -> Option<Result<CoverageTable<'a>, ReadError>>
pub fn horiz_glyph_coverage( &self, ) -> Option<Result<CoverageTable<'a>, ReadError>>
Attempt to resolve horiz_glyph_coverage_offset.
Sourcepub fn vert_glyph_count(&self) -> u16
pub fn vert_glyph_count(&self) -> u16
Number of glyphs for which information is provided for vertically growing variants. Must be the same as the number of glyph IDs referenced in the vertical Coverage table.
Sourcepub fn horiz_glyph_count(&self) -> u16
pub fn horiz_glyph_count(&self) -> u16
Number of glyphs for which information is provided for horizontally growing variants. Must be the same as the number of glyph IDs referenced in the horizontal Coverage table.
Sourcepub fn vert_glyph_construction_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn vert_glyph_construction_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to MathGlyphConstruction tables, from the beginning of the MathVariants table, for shapes growing in the vertical direction.
Sourcepub fn vert_glyph_constructions(
&self,
) -> ArrayOfOffsets<'a, MathGlyphConstruction<'a>, Offset16>
pub fn vert_glyph_constructions( &self, ) -> ArrayOfOffsets<'a, MathGlyphConstruction<'a>, Offset16>
A dynamically resolving wrapper for vert_glyph_construction_offsets.
Sourcepub fn horiz_glyph_construction_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn horiz_glyph_construction_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to MathGlyphConstruction tables, from the beginning of the MathVariants table, for shapes growing in the horizontal direction.
Sourcepub fn horiz_glyph_constructions(
&self,
) -> ArrayOfOffsets<'a, MathGlyphConstruction<'a>, Offset16>
pub fn horiz_glyph_constructions( &self, ) -> ArrayOfOffsets<'a, MathGlyphConstruction<'a>, Offset16>
A dynamically resolving wrapper for horiz_glyph_construction_offsets.
pub fn min_connector_overlap_byte_range(&self) -> Range<usize> ⓘ
pub fn vert_glyph_coverage_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn horiz_glyph_coverage_offset_byte_range(&self) -> Range<usize> ⓘ
pub fn vert_glyph_count_byte_range(&self) -> Range<usize> ⓘ
pub fn horiz_glyph_count_byte_range(&self) -> Range<usize> ⓘ
pub fn vert_glyph_construction_offsets_byte_range(&self) -> Range<usize> ⓘ
pub fn horiz_glyph_construction_offsets_byte_range(&self) -> Range<usize> ⓘ
Source§impl<'a> MathVariants<'a>
impl<'a> MathVariants<'a>
Sourcepub fn glyph_construction(
&self,
glyph: GlyphId,
axis: StretchAxis,
) -> Option<MathGlyphConstruction<'a>>
pub fn glyph_construction( &self, glyph: GlyphId, axis: StretchAxis, ) -> Option<MathGlyphConstruction<'a>>
How a glyph is stretched along an axis, or None where the table does
not stretch it that way.