pub struct TableRef<'a, T> { /* private fields */ }
Expand description
Typed access to raw table data.
Implementations§
Source§impl<'a, T> TableRef<'a, T>
impl<'a, T> TableRef<'a, T>
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.
Source§impl<'a> TableRef<'a, Lookup2Marker>
impl<'a> TableRef<'a, Lookup2Marker>
Sourcepub fn search_range(&self) -> u16
pub fn search_range(&self) -> u16
The value of unitSize times the largest power of 2 that is less than or equal to the value of nUnits.
Sourcepub fn entry_selector(&self) -> u16
pub fn entry_selector(&self) -> u16
The log base 2 of the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn range_shift(&self) -> u16
pub fn range_shift(&self) -> u16
The value of unitSize times the difference of the value of nUnits minus the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn segments_data(&self) -> &'a [u8] ⓘ
pub fn segments_data(&self) -> &'a [u8] ⓘ
Segments.
Source§impl<'a> TableRef<'a, Lookup4Marker>
impl<'a> TableRef<'a, Lookup4Marker>
Sourcepub fn search_range(&self) -> u16
pub fn search_range(&self) -> u16
The value of unitSize times the largest power of 2 that is less than or equal to the value of nUnits.
Sourcepub fn entry_selector(&self) -> u16
pub fn entry_selector(&self) -> u16
The log base 2 of the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn range_shift(&self) -> u16
pub fn range_shift(&self) -> u16
The value of unitSize times the difference of the value of nUnits minus the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn segments(&self) -> &'a [LookupSegment4]
pub fn segments(&self) -> &'a [LookupSegment4]
Segments.
Source§impl<'a> TableRef<'a, Lookup6Marker>
impl<'a> TableRef<'a, Lookup6Marker>
Sourcepub fn search_range(&self) -> u16
pub fn search_range(&self) -> u16
The value of unitSize times the largest power of 2 that is less than or equal to the value of nUnits.
Sourcepub fn entry_selector(&self) -> u16
pub fn entry_selector(&self) -> u16
The log base 2 of the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn range_shift(&self) -> u16
pub fn range_shift(&self) -> u16
The value of unitSize times the difference of the value of nUnits minus the largest power of 2 less than or equal to the value of nUnits.
Sourcepub fn entries_data(&self) -> &'a [u8] ⓘ
pub fn entries_data(&self) -> &'a [u8] ⓘ
Values, indexed by glyph index.
Source§impl<'a> TableRef<'a, Lookup8Marker>
impl<'a> TableRef<'a, Lookup8Marker>
Sourcepub fn first_glyph(&self) -> u16
pub fn first_glyph(&self) -> u16
First glyph index included in the trimmed array.
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Total number of glyphs (equivalent to the last glyph minus the value of firstGlyph plus 1).
Sourcepub fn value_array(&self) -> &'a [BigEndian<u16>]
pub fn value_array(&self) -> &'a [BigEndian<u16>]
The lookup values (indexed by the glyph index minus the value of firstGlyph). Entries in the value array must be two bytes.
Source§impl<'a> TableRef<'a, Lookup10Marker>
impl<'a> TableRef<'a, Lookup10Marker>
Sourcepub fn unit_size(&self) -> u16
pub fn unit_size(&self) -> u16
Size of a lookup unit for this lookup table in bytes. Allowed values are 1, 2, 4, and 8.
Sourcepub fn first_glyph(&self) -> u16
pub fn first_glyph(&self) -> u16
First glyph index included in the trimmed array.
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Total number of glyphs (equivalent to the last glyph minus the value of firstGlyph plus 1).
Sourcepub fn values_data(&self) -> &'a [u8] ⓘ
pub fn values_data(&self) -> &'a [u8] ⓘ
The lookup values (indexed by the glyph index minus the value of firstGlyph).
Source§impl<'a> TableRef<'a, StateHeaderMarker>
impl<'a> TableRef<'a, StateHeaderMarker>
Sourcepub fn state_size(&self) -> u16
pub fn state_size(&self) -> u16
Size of a state, in bytes. The size is limited to 8 bits, although the field is 16 bits for alignment.
Sourcepub fn class_table_offset(&self) -> Offset16
pub fn class_table_offset(&self) -> Offset16
Byte offset from the beginning of the state table to the class subtable.
Sourcepub fn class_table(&self) -> Result<ClassSubtable<'a>, ReadError>
pub fn class_table(&self) -> Result<ClassSubtable<'a>, ReadError>
Attempt to resolve class_table_offset
.
Sourcepub fn state_array_offset(&self) -> Offset16
pub fn state_array_offset(&self) -> Offset16
Byte offset from the beginning of the state table to the state array.
Sourcepub fn state_array(&self) -> Result<RawBytes<'a>, ReadError>
pub fn state_array(&self) -> Result<RawBytes<'a>, ReadError>
Attempt to resolve state_array_offset
.
Sourcepub fn entry_table_offset(&self) -> Offset16
pub fn entry_table_offset(&self) -> Offset16
Byte offset from the beginning of the state table to the entry subtable.
Sourcepub fn entry_table(&self) -> Result<RawBytes<'a>, ReadError>
pub fn entry_table(&self) -> Result<RawBytes<'a>, ReadError>
Attempt to resolve entry_table_offset
.
Source§impl<'a> TableRef<'a, ClassSubtableMarker>
impl<'a> TableRef<'a, ClassSubtableMarker>
Sourcepub fn first_glyph(&self) -> u16
pub fn first_glyph(&self) -> u16
Glyph index of the first glyph in the class table.
Sourcepub fn class_array(&self) -> &'a [u8] ⓘ
pub fn class_array(&self) -> &'a [u8] ⓘ
The class codes (indexed by glyph index minus firstGlyph). Class codes range from 0 to the value of stateSize minus 1.
Source§impl<'a> TableRef<'a, StxHeaderMarker>
impl<'a> TableRef<'a, StxHeaderMarker>
Sourcepub fn n_classes(&self) -> u32
pub fn n_classes(&self) -> u32
Number of classes, which is the number of 16-bit entry indices in a single line in the state array.
Sourcepub fn class_table_offset(&self) -> Offset32
pub fn class_table_offset(&self) -> Offset32
Byte offset from the beginning of the state table to the class subtable.
Sourcepub fn class_table(&self) -> Result<LookupU16<'a>, ReadError>
pub fn class_table(&self) -> Result<LookupU16<'a>, ReadError>
Attempt to resolve class_table_offset
.
Sourcepub fn state_array_offset(&self) -> Offset32
pub fn state_array_offset(&self) -> Offset32
Byte offset from the beginning of the state table to the state array.
Sourcepub fn state_array(&self) -> Result<RawWords<'a>, ReadError>
pub fn state_array(&self) -> Result<RawWords<'a>, ReadError>
Attempt to resolve state_array_offset
.
Sourcepub fn entry_table_offset(&self) -> Offset32
pub fn entry_table_offset(&self) -> Offset32
Byte offset from the beginning of the state table to the entry subtable.
Sourcepub fn entry_table(&self) -> Result<RawBytes<'a>, ReadError>
pub fn entry_table(&self) -> Result<RawBytes<'a>, ReadError>
Attempt to resolve entry_table_offset
.
Source§impl<'a> TableRef<'a, AnkrMarker>
impl<'a> TableRef<'a, AnkrMarker>
Sourcepub fn lookup_table_offset(&self) -> Offset32
pub fn lookup_table_offset(&self) -> Offset32
Offset to the table’s lookup table; currently this is always 0x0000000C
.
Lookup values are two byte offsets into the glyph data table.
Sourcepub fn lookup_table(&self) -> Result<LookupU16<'a>, ReadError>
pub fn lookup_table(&self) -> Result<LookupU16<'a>, ReadError>
Attempt to resolve lookup_table_offset
.
Sourcepub fn glyph_data_table_offset(&self) -> u32
pub fn glyph_data_table_offset(&self) -> u32
Offset to the glyph data table.
Source§impl<'a> TableRef<'a, GlyphDataEntryMarker>
impl<'a> TableRef<'a, GlyphDataEntryMarker>
Sourcepub fn num_points(&self) -> u32
pub fn num_points(&self) -> u32
Number of anchor points for this glyph.
Sourcepub fn anchor_points(&self) -> &'a [AnchorPoint]
pub fn anchor_points(&self) -> &'a [AnchorPoint]
Individual anchor points.
Source§impl<'a> TableRef<'a, AnkrMarker>
impl<'a> TableRef<'a, AnkrMarker>
Sourcepub fn anchor_points(
&self,
glyph_id: GlyphId,
) -> Result<&'a [AnchorPoint], ReadError>
pub fn anchor_points( &self, glyph_id: GlyphId, ) -> Result<&'a [AnchorPoint], ReadError>
Returns the set of anchor points for the given glyph.
Source§impl<'a> TableRef<'a, AvarMarker>
impl<'a> TableRef<'a, AvarMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major version number of the axis variations table — set to 1 or 2. Minor version number of the axis variations table — set to 0.
Sourcepub fn axis_count(&self) -> u16
pub fn axis_count(&self) -> u16
The number of variation axes for this font. This must be the same number as axisCount in the ‘fvar’ table.
Sourcepub fn axis_segment_maps(&self) -> VarLenArray<'a, SegmentMaps<'a>>
pub fn axis_segment_maps(&self) -> VarLenArray<'a, SegmentMaps<'a>>
The segment maps array — one segment map for each axis, in the order of axes specified in the ‘fvar’ table.
Sourcepub fn axis_index_map_offset(&self) -> Option<Nullable<Offset32>>
pub fn axis_index_map_offset(&self) -> Option<Nullable<Offset32>>
Offset to DeltaSetIndexMap table (may be NULL).
Sourcepub fn axis_index_map(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn axis_index_map(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve axis_index_map_offset
.
Sourcepub fn var_store_offset(&self) -> Option<Nullable<Offset32>>
pub fn var_store_offset(&self) -> Option<Nullable<Offset32>>
Offset to ItemVariationStore (may be NULL).
Sourcepub fn var_store(&self) -> Option<Result<ItemVariationStore<'a>, ReadError>>
pub fn var_store(&self) -> Option<Result<ItemVariationStore<'a>, ReadError>>
Attempt to resolve var_store_offset
.
Source§impl<'a> TableRef<'a, BaseMarker>
impl<'a> TableRef<'a, BaseMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
(major, minor) Version for the BASE table (1,0) or (1,1)
Sourcepub fn horiz_axis_offset(&self) -> Nullable<Offset16>
pub fn horiz_axis_offset(&self) -> Nullable<Offset16>
Offset to horizontal Axis table, from beginning of BASE table (may be NULL)
Sourcepub fn horiz_axis(&self) -> Option<Result<Axis<'a>, ReadError>>
pub fn horiz_axis(&self) -> Option<Result<Axis<'a>, ReadError>>
Attempt to resolve horiz_axis_offset
.
Sourcepub fn vert_axis_offset(&self) -> Nullable<Offset16>
pub fn vert_axis_offset(&self) -> Nullable<Offset16>
Offset to vertical Axis table, from beginning of BASE table (may be NULL)
Sourcepub fn vert_axis(&self) -> Option<Result<Axis<'a>, ReadError>>
pub fn vert_axis(&self) -> Option<Result<Axis<'a>, ReadError>>
Attempt to resolve vert_axis_offset
.
Sourcepub fn item_var_store_offset(&self) -> Option<Nullable<Offset32>>
pub fn item_var_store_offset(&self) -> Option<Nullable<Offset32>>
Offset to Item Variation Store table, from beginning of BASE table (may be null)
Sourcepub fn item_var_store(
&self,
) -> Option<Result<ItemVariationStore<'a>, ReadError>>
pub fn item_var_store( &self, ) -> Option<Result<ItemVariationStore<'a>, ReadError>>
Attempt to resolve item_var_store_offset
.
Source§impl<'a> TableRef<'a, AxisMarker>
impl<'a> TableRef<'a, AxisMarker>
Sourcepub fn base_tag_list_offset(&self) -> Nullable<Offset16>
pub fn base_tag_list_offset(&self) -> Nullable<Offset16>
Offset to BaseTagList table, from beginning of Axis table (may be NULL)
Sourcepub fn base_tag_list(&self) -> Option<Result<BaseTagList<'a>, ReadError>>
pub fn base_tag_list(&self) -> Option<Result<BaseTagList<'a>, ReadError>>
Attempt to resolve base_tag_list_offset
.
Sourcepub fn base_script_list_offset(&self) -> Offset16
pub fn base_script_list_offset(&self) -> Offset16
Offset to BaseScriptList table, from beginning of Axis table
Sourcepub fn base_script_list(&self) -> Result<BaseScriptList<'a>, ReadError>
pub fn base_script_list(&self) -> Result<BaseScriptList<'a>, ReadError>
Attempt to resolve base_script_list_offset
.
Source§impl<'a> TableRef<'a, BaseTagListMarker>
impl<'a> TableRef<'a, BaseTagListMarker>
Sourcepub fn base_tag_count(&self) -> u16
pub fn base_tag_count(&self) -> u16
Number of baseline identification tags in this text direction — may be zero (0)
Array of 4-byte baseline identification tags — must be in alphabetical order
Source§impl<'a> TableRef<'a, BaseScriptListMarker>
impl<'a> TableRef<'a, BaseScriptListMarker>
Sourcepub fn base_script_count(&self) -> u16
pub fn base_script_count(&self) -> u16
Number of BaseScriptRecords defined
Sourcepub fn base_script_records(&self) -> &'a [BaseScriptRecord]
pub fn base_script_records(&self) -> &'a [BaseScriptRecord]
Array of BaseScriptRecords, in alphabetical order by baseScriptTag
Source§impl<'a> TableRef<'a, BaseScriptMarker>
impl<'a> TableRef<'a, BaseScriptMarker>
Sourcepub fn base_values_offset(&self) -> Nullable<Offset16>
pub fn base_values_offset(&self) -> Nullable<Offset16>
Offset to BaseValues table, from beginning of BaseScript table (may be NULL)
Sourcepub fn base_values(&self) -> Option<Result<BaseValues<'a>, ReadError>>
pub fn base_values(&self) -> Option<Result<BaseValues<'a>, ReadError>>
Attempt to resolve base_values_offset
.
Sourcepub fn default_min_max_offset(&self) -> Nullable<Offset16>
pub fn default_min_max_offset(&self) -> Nullable<Offset16>
Offset to MinMax table, from beginning of BaseScript table (may be NULL)
Sourcepub fn default_min_max(&self) -> Option<Result<MinMax<'a>, ReadError>>
pub fn default_min_max(&self) -> Option<Result<MinMax<'a>, ReadError>>
Attempt to resolve default_min_max_offset
.
Sourcepub fn base_lang_sys_count(&self) -> u16
pub fn base_lang_sys_count(&self) -> u16
Number of BaseLangSysRecords defined — may be zero (0)
Sourcepub fn base_lang_sys_records(&self) -> &'a [BaseLangSysRecord]
pub fn base_lang_sys_records(&self) -> &'a [BaseLangSysRecord]
Array of BaseLangSysRecords, in alphabetical order by BaseLangSysTag
Source§impl<'a> TableRef<'a, BaseValuesMarker>
impl<'a> TableRef<'a, BaseValuesMarker>
Sourcepub fn default_baseline_index(&self) -> u16
pub fn default_baseline_index(&self) -> u16
Index number of default baseline for this script — equals index position of baseline tag in baselineTags array of the BaseTagList
Sourcepub fn base_coord_count(&self) -> u16
pub fn base_coord_count(&self) -> u16
Number of BaseCoord tables defined — should equal baseTagCount in the BaseTagList
Sourcepub fn base_coord_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn base_coord_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to BaseCoord tables, from beginning of BaseValues table — order matches baselineTags array in the BaseTagList
Sourcepub fn base_coords(&self) -> ArrayOfOffsets<'a, BaseCoord<'a>, Offset16>
pub fn base_coords(&self) -> ArrayOfOffsets<'a, BaseCoord<'a>, Offset16>
A dynamically resolving wrapper for base_coord_offsets
.
Source§impl<'a> TableRef<'a, MinMaxMarker>
impl<'a> TableRef<'a, MinMaxMarker>
Sourcepub fn min_coord_offset(&self) -> Nullable<Offset16>
pub fn min_coord_offset(&self) -> Nullable<Offset16>
Offset to BaseCoord table that defines the minimum extent value, from the beginning of MinMax table (may be NULL)
Sourcepub fn min_coord(&self) -> Option<Result<BaseCoord<'a>, ReadError>>
pub fn min_coord(&self) -> Option<Result<BaseCoord<'a>, ReadError>>
Attempt to resolve min_coord_offset
.
Sourcepub fn max_coord_offset(&self) -> Nullable<Offset16>
pub fn max_coord_offset(&self) -> Nullable<Offset16>
Offset to BaseCoord table that defines maximum extent value, from the beginning of MinMax table (may be NULL)
Sourcepub fn max_coord(&self) -> Option<Result<BaseCoord<'a>, ReadError>>
pub fn max_coord(&self) -> Option<Result<BaseCoord<'a>, ReadError>>
Attempt to resolve max_coord_offset
.
Sourcepub fn feat_min_max_count(&self) -> u16
pub fn feat_min_max_count(&self) -> u16
Number of FeatMinMaxRecords — may be zero (0)
Sourcepub fn feat_min_max_records(&self) -> &'a [FeatMinMaxRecord]
pub fn feat_min_max_records(&self) -> &'a [FeatMinMaxRecord]
Array of FeatMinMaxRecords, in alphabetical order by featureTableTag
Source§impl<'a> TableRef<'a, BaseCoordFormat1Marker>
impl<'a> TableRef<'a, BaseCoordFormat1Marker>
Sourcepub fn base_coord_format(&self) -> u16
pub fn base_coord_format(&self) -> u16
Format identifier — format = 1
Sourcepub fn coordinate(&self) -> i16
pub fn coordinate(&self) -> i16
X or Y value, in design units
Source§impl<'a> TableRef<'a, BaseCoordFormat2Marker>
impl<'a> TableRef<'a, BaseCoordFormat2Marker>
Sourcepub fn base_coord_format(&self) -> u16
pub fn base_coord_format(&self) -> u16
Format identifier — format = 2
Sourcepub fn coordinate(&self) -> i16
pub fn coordinate(&self) -> i16
X or Y value, in design units
Sourcepub fn reference_glyph(&self) -> u16
pub fn reference_glyph(&self) -> u16
Glyph ID of control glyph
Sourcepub fn base_coord_point(&self) -> u16
pub fn base_coord_point(&self) -> u16
Index of contour point on the reference glyph
Source§impl<'a> TableRef<'a, BaseCoordFormat3Marker>
impl<'a> TableRef<'a, BaseCoordFormat3Marker>
Sourcepub fn base_coord_format(&self) -> u16
pub fn base_coord_format(&self) -> u16
Format identifier — format = 3
Sourcepub fn coordinate(&self) -> i16
pub fn coordinate(&self) -> i16
X or Y value, in design units
Sourcepub fn device_offset(&self) -> Nullable<Offset16>
pub fn device_offset(&self) -> Nullable<Offset16>
Offset to Device table (non-variable font) / Variation Index table (variable font) for X or Y value, from beginning of BaseCoord table (may be NULL).
Sourcepub fn device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
Attempt to resolve device_offset
.
Source§impl<'a> TableRef<'a, IndexSubtableArrayMarker>
impl<'a> TableRef<'a, IndexSubtableArrayMarker>
Sourcepub fn first_glyph_index(&self) -> GlyphId16
pub fn first_glyph_index(&self) -> GlyphId16
First glyph ID of this range.
Sourcepub fn last_glyph_index(&self) -> GlyphId16
pub fn last_glyph_index(&self) -> GlyphId16
Last glyph ID of this range (inclusive).
Sourcepub fn additional_offset_to_index_subtable(&self) -> u32
pub fn additional_offset_to_index_subtable(&self) -> u32
Add to indexSubTableArrayOffset to get offset from beginning of EBLC.
Source§impl<'a> TableRef<'a, IndexSubtable1Marker>
impl<'a> TableRef<'a, IndexSubtable1Marker>
Sourcepub fn index_format(&self) -> u16
pub fn index_format(&self) -> u16
Format of this IndexSubTable.
Sourcepub fn image_format(&self) -> u16
pub fn image_format(&self) -> u16
Format of EBDT image data.
Sourcepub fn image_data_offset(&self) -> u32
pub fn image_data_offset(&self) -> u32
Offset to image data in EBDT table.
pub fn sbit_offsets(&self) -> &'a [BigEndian<u32>]
Source§impl<'a> TableRef<'a, IndexSubtable2Marker>
impl<'a> TableRef<'a, IndexSubtable2Marker>
Sourcepub fn index_format(&self) -> u16
pub fn index_format(&self) -> u16
Format of this IndexSubTable.
Sourcepub fn image_format(&self) -> u16
pub fn image_format(&self) -> u16
Format of EBDT image data.
Sourcepub fn image_data_offset(&self) -> u32
pub fn image_data_offset(&self) -> u32
Offset to image data in EBDT table.
Sourcepub fn image_size(&self) -> u32
pub fn image_size(&self) -> u32
All the glyphs are of the same size.
Sourcepub fn big_metrics(&self) -> &'a [BigGlyphMetrics]
pub fn big_metrics(&self) -> &'a [BigGlyphMetrics]
All glyphs have the same metrics; glyph data may be compressed, byte-aligned, or bit-aligned.
Source§impl<'a> TableRef<'a, IndexSubtable3Marker>
impl<'a> TableRef<'a, IndexSubtable3Marker>
Sourcepub fn index_format(&self) -> u16
pub fn index_format(&self) -> u16
Format of this IndexSubTable.
Sourcepub fn image_format(&self) -> u16
pub fn image_format(&self) -> u16
Format of EBDT image data.
Sourcepub fn image_data_offset(&self) -> u32
pub fn image_data_offset(&self) -> u32
Offset to image data in EBDT table.
pub fn sbit_offsets(&self) -> &'a [BigEndian<u16>]
Source§impl<'a> TableRef<'a, IndexSubtable4Marker>
impl<'a> TableRef<'a, IndexSubtable4Marker>
Sourcepub fn index_format(&self) -> u16
pub fn index_format(&self) -> u16
Format of this IndexSubTable.
Sourcepub fn image_format(&self) -> u16
pub fn image_format(&self) -> u16
Format of EBDT image data.
Sourcepub fn image_data_offset(&self) -> u32
pub fn image_data_offset(&self) -> u32
Offset to image data in EBDT table.
Sourcepub fn num_glyphs(&self) -> u32
pub fn num_glyphs(&self) -> u32
Array length.
Sourcepub fn glyph_array(&self) -> &'a [GlyphIdOffsetPair]
pub fn glyph_array(&self) -> &'a [GlyphIdOffsetPair]
One per glyph.
Source§impl<'a> TableRef<'a, IndexSubtable5Marker>
impl<'a> TableRef<'a, IndexSubtable5Marker>
Sourcepub fn index_format(&self) -> u16
pub fn index_format(&self) -> u16
Format of this IndexSubTable.
Sourcepub fn image_format(&self) -> u16
pub fn image_format(&self) -> u16
Format of EBDT image data.
Sourcepub fn image_data_offset(&self) -> u32
pub fn image_data_offset(&self) -> u32
Offset to image data in EBDT table.
Sourcepub fn image_size(&self) -> u32
pub fn image_size(&self) -> u32
All glyphs have the same data size.
Sourcepub fn big_metrics(&self) -> &'a [BigGlyphMetrics]
pub fn big_metrics(&self) -> &'a [BigGlyphMetrics]
All glyphs have the same metrics.
Sourcepub fn num_glyphs(&self) -> u32
pub fn num_glyphs(&self) -> u32
Array length.
Sourcepub fn glyph_array(&self) -> &'a [BigEndian<GlyphId16>]
pub fn glyph_array(&self) -> &'a [BigEndian<GlyphId16>]
One per glyph, sorted by glyhph ID.
Source§impl<'a> TableRef<'a, CbdtMarker>
impl<'a> TableRef<'a, CbdtMarker>
Sourcepub fn major_version(&self) -> u16
pub fn major_version(&self) -> u16
Major version of the CBDT table, = 3.
Sourcepub fn minor_version(&self) -> u16
pub fn minor_version(&self) -> u16
Minor version of CBDT table, = 0.
Source§impl<'a> TableRef<'a, CbdtMarker>
impl<'a> TableRef<'a, CbdtMarker>
pub fn data( &self, location: &BitmapLocation, ) -> Result<BitmapData<'a>, ReadError>
Source§impl<'a> TableRef<'a, CblcMarker>
impl<'a> TableRef<'a, CblcMarker>
Sourcepub fn major_version(&self) -> u16
pub fn major_version(&self) -> u16
Major version of the CBLC table, = 3.
Sourcepub fn minor_version(&self) -> u16
pub fn minor_version(&self) -> u16
Minor version of CBLC table, = 0.
Sourcepub fn bitmap_sizes(&self) -> &'a [BitmapSize]
pub fn bitmap_sizes(&self) -> &'a [BitmapSize]
BitmapSize records array.
Source§impl<'a> TableRef<'a, CffHeaderMarker>
impl<'a> TableRef<'a, CffHeaderMarker>
Sourcepub fn trailing_data(&self) -> &'a [u8] ⓘ
pub fn trailing_data(&self) -> &'a [u8] ⓘ
Remaining table data.
Source§impl<'a> TableRef<'a, Cff2HeaderMarker>
impl<'a> TableRef<'a, Cff2HeaderMarker>
Sourcepub fn major_version(&self) -> u8
pub fn major_version(&self) -> u8
Format major version (set to 2).
Sourcepub fn minor_version(&self) -> u8
pub fn minor_version(&self) -> u8
Format minor version (set to 0).
Sourcepub fn header_size(&self) -> u8
pub fn header_size(&self) -> u8
Header size (bytes).
Sourcepub fn top_dict_length(&self) -> u16
pub fn top_dict_length(&self) -> u16
Length of Top DICT structure in bytes.
Sourcepub fn top_dict_data(&self) -> &'a [u8] ⓘ
pub fn top_dict_data(&self) -> &'a [u8] ⓘ
Data containing the Top DICT.
Sourcepub fn trailing_data(&self) -> &'a [u8] ⓘ
pub fn trailing_data(&self) -> &'a [u8] ⓘ
Remaining table data.
Source§impl<'a> TableRef<'a, CmapMarker>
impl<'a> TableRef<'a, CmapMarker>
Sourcepub fn num_tables(&self) -> u16
pub fn num_tables(&self) -> u16
Number of encoding tables that follow.
pub fn encoding_records(&self) -> &'a [EncodingRecord]
Source§impl<'a> TableRef<'a, Cmap0Marker>
impl<'a> TableRef<'a, Cmap0Marker>
Source§impl<'a> TableRef<'a, Cmap2Marker>
impl<'a> TableRef<'a, Cmap2Marker>
Source§impl<'a> TableRef<'a, Cmap4Marker>
impl<'a> TableRef<'a, Cmap4Marker>
Sourcepub fn language(&self) -> u16
pub fn language(&self) -> u16
For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.
Sourcepub fn seg_count_x2(&self) -> u16
pub fn seg_count_x2(&self) -> u16
2 × segCount.
Sourcepub fn search_range(&self) -> u16
pub fn search_range(&self) -> u16
Maximum power of 2 less than or equal to segCount, times 2 ((2floor(log2(segCount))) * 2, where “” is an exponentiation operator)
Sourcepub fn entry_selector(&self) -> u16
pub fn entry_selector(&self) -> u16
Log2 of the maximum power of 2 less than or equal to numTables (log2(searchRange/2), which is equal to floor(log2(segCount)))
Sourcepub fn range_shift(&self) -> u16
pub fn range_shift(&self) -> u16
segCount times 2, minus searchRange ((segCount * 2) - searchRange)
Sourcepub fn end_code(&self) -> &'a [BigEndian<u16>]
pub fn end_code(&self) -> &'a [BigEndian<u16>]
End characterCode for each segment, last=0xFFFF.
Sourcepub fn start_code(&self) -> &'a [BigEndian<u16>]
pub fn start_code(&self) -> &'a [BigEndian<u16>]
Start character code for each segment.
Sourcepub fn id_range_offsets(&self) -> &'a [BigEndian<u16>]
pub fn id_range_offsets(&self) -> &'a [BigEndian<u16>]
Offsets into glyphIdArray or 0
Sourcepub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
pub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
Glyph index array (arbitrary length)
Source§impl<'a> TableRef<'a, Cmap6Marker>
impl<'a> TableRef<'a, Cmap6Marker>
Sourcepub fn language(&self) -> u16
pub fn language(&self) -> u16
For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.
Sourcepub fn first_code(&self) -> u16
pub fn first_code(&self) -> u16
First character code of subrange.
Sourcepub fn entry_count(&self) -> u16
pub fn entry_count(&self) -> u16
Number of character codes in subrange.
Sourcepub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
pub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
Array of glyph index values for character codes in the range.
Source§impl<'a> TableRef<'a, Cmap8Marker>
impl<'a> TableRef<'a, Cmap8Marker>
Sourcepub fn language(&self) -> u32
pub fn language(&self) -> u32
For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.
Sourcepub fn is32(&self) -> &'a [u8] ⓘ
pub fn is32(&self) -> &'a [u8] ⓘ
Tightly packed array of bits (8K bytes total) indicating whether the particular 16-bit (index) value is the start of a 32-bit character code
Sourcepub fn num_groups(&self) -> u32
pub fn num_groups(&self) -> u32
Number of groupings which follow
Sourcepub fn groups(&self) -> &'a [SequentialMapGroup]
pub fn groups(&self) -> &'a [SequentialMapGroup]
Array of SequentialMapGroup records.
Source§impl<'a> TableRef<'a, Cmap10Marker>
impl<'a> TableRef<'a, Cmap10Marker>
Sourcepub fn language(&self) -> u32
pub fn language(&self) -> u32
For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.
Sourcepub fn start_char_code(&self) -> u32
pub fn start_char_code(&self) -> u32
First character code covered
Sourcepub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
pub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]
Array of glyph indices for the character codes covered
Source§impl<'a> TableRef<'a, Cmap12Marker>
impl<'a> TableRef<'a, Cmap12Marker>
Sourcepub fn language(&self) -> u32
pub fn language(&self) -> u32
For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.
Sourcepub fn num_groups(&self) -> u32
pub fn num_groups(&self) -> u32
Number of groupings which follow
Sourcepub fn groups(&self) -> &'a [SequentialMapGroup]
pub fn groups(&self) -> &'a [SequentialMapGroup]
Array of SequentialMapGroup records.
Source§impl<'a> TableRef<'a, Cmap13Marker>
impl<'a> TableRef<'a, Cmap13Marker>
Sourcepub fn language(&self) -> u32
pub fn language(&self) -> u32
For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.
Sourcepub fn num_groups(&self) -> u32
pub fn num_groups(&self) -> u32
Number of groupings which follow
Sourcepub fn groups(&self) -> &'a [ConstantMapGroup]
pub fn groups(&self) -> &'a [ConstantMapGroup]
Array of ConstantMapGroup records.
Source§impl<'a> TableRef<'a, Cmap14Marker>
impl<'a> TableRef<'a, Cmap14Marker>
Sourcepub fn num_var_selector_records(&self) -> u32
pub fn num_var_selector_records(&self) -> u32
Number of variation Selector Records
Sourcepub fn var_selector(&self) -> &'a [VariationSelector]
pub fn var_selector(&self) -> &'a [VariationSelector]
Array of VariationSelector records.
Source§impl<'a> TableRef<'a, DefaultUvsMarker>
impl<'a> TableRef<'a, DefaultUvsMarker>
Sourcepub fn num_unicode_value_ranges(&self) -> u32
pub fn num_unicode_value_ranges(&self) -> u32
Number of Unicode character ranges.
Sourcepub fn ranges(&self) -> &'a [UnicodeRange]
pub fn ranges(&self) -> &'a [UnicodeRange]
Array of UnicodeRange records.
Source§impl<'a> TableRef<'a, NonDefaultUvsMarker>
impl<'a> TableRef<'a, NonDefaultUvsMarker>
pub fn num_uvs_mappings(&self) -> u32
pub fn uvs_mapping(&self) -> &'a [UvsMapping]
Source§impl TableRef<'_, CmapMarker>
impl TableRef<'_, CmapMarker>
Sourcepub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
pub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
Map a codepoint to a nominal glyph identifier
This uses the first available subtable that provides a valid mapping.
§Note:
Mapping logic is currently only implemented for the most common subtable formats.
pub fn closure_glyphs( &self, unicodes: &IntSet<u32>, glyph_set: &mut IntSet<GlyphId>, )
std
only.Source§impl<'a> TableRef<'a, Cmap12Marker>
impl<'a> TableRef<'a, Cmap12Marker>
Sourcepub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
pub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>
Maps a codepoint to a nominal glyph identifier.
Sourcepub fn iter(&self) -> Cmap12Iter<'a> ⓘ
pub fn iter(&self) -> Cmap12Iter<'a> ⓘ
Returns an iterator over all (codepoint, glyph identifier) pairs in the subtable.
Source§impl<'a> TableRef<'a, Cmap14Marker>
impl<'a> TableRef<'a, Cmap14Marker>
Sourcepub fn map_variant(
&self,
codepoint: impl Into<u32>,
selector: impl Into<u32>,
) -> Option<MapVariant>
pub fn map_variant( &self, codepoint: impl Into<u32>, selector: impl Into<u32>, ) -> Option<MapVariant>
Maps a codepoint and variation selector to a nominal glyph identifier.
Sourcepub fn iter(&self) -> Cmap14Iter<'a> ⓘ
pub fn iter(&self) -> Cmap14Iter<'a> ⓘ
Returns an iterator over all (codepoint, selector, mapping variant) triples in the subtable.
pub fn closure_glyphs( &self, unicodes: &IntSet<u32>, glyph_set: &mut IntSet<GlyphId>, )
std
only.Source§impl TableRef<'_, ColrMarker>
impl TableRef<'_, ColrMarker>
pub fn v0_closure_palette_indices( &self, glyph_set: &IntSet<GlyphId>, palette_indices: &mut IntSet<u16>, )
std
only.Sourcepub fn v1_closure(
&self,
glyph_set: &mut IntSet<GlyphId>,
layer_indices: &mut IntSet<u32>,
palette_indices: &mut IntSet<u16>,
variation_indices: &mut IntSet<u32>,
delta_set_indices: &mut IntSet<u32>,
)
Available on crate feature std
only.
pub fn v1_closure( &self, glyph_set: &mut IntSet<GlyphId>, layer_indices: &mut IntSet<u32>, palette_indices: &mut IntSet<u16>, variation_indices: &mut IntSet<u32>, delta_set_indices: &mut IntSet<u32>, )
std
only.Collect the transitive closure of v1 glyphs,layer/paletted indices and variation/delta set indices for COLRv1
Source§impl<'a> TableRef<'a, ColrMarker>
impl<'a> TableRef<'a, ColrMarker>
Sourcepub fn num_base_glyph_records(&self) -> u16
pub fn num_base_glyph_records(&self) -> u16
Number of BaseGlyph records; may be 0 in a version 1 table.
Sourcepub fn base_glyph_records_offset(&self) -> Nullable<Offset32>
pub fn base_glyph_records_offset(&self) -> Nullable<Offset32>
Offset to baseGlyphRecords array (may be NULL).
Sourcepub fn base_glyph_records(&self) -> Option<Result<&'a [BaseGlyph], ReadError>>
pub fn base_glyph_records(&self) -> Option<Result<&'a [BaseGlyph], ReadError>>
Attempt to resolve base_glyph_records_offset
.
Sourcepub fn layer_records_offset(&self) -> Nullable<Offset32>
pub fn layer_records_offset(&self) -> Nullable<Offset32>
Offset to layerRecords array (may be NULL).
Sourcepub fn layer_records(&self) -> Option<Result<&'a [Layer], ReadError>>
pub fn layer_records(&self) -> Option<Result<&'a [Layer], ReadError>>
Attempt to resolve layer_records_offset
.
Sourcepub fn num_layer_records(&self) -> u16
pub fn num_layer_records(&self) -> u16
Number of Layer records; may be 0 in a version 1 table.
Sourcepub fn base_glyph_list_offset(&self) -> Option<Nullable<Offset32>>
pub fn base_glyph_list_offset(&self) -> Option<Nullable<Offset32>>
Offset to BaseGlyphList table.
Sourcepub fn base_glyph_list(&self) -> Option<Result<BaseGlyphList<'a>, ReadError>>
pub fn base_glyph_list(&self) -> Option<Result<BaseGlyphList<'a>, ReadError>>
Attempt to resolve base_glyph_list_offset
.
Sourcepub fn layer_list_offset(&self) -> Option<Nullable<Offset32>>
pub fn layer_list_offset(&self) -> Option<Nullable<Offset32>>
Offset to LayerList table (may be NULL).
Sourcepub fn layer_list(&self) -> Option<Result<LayerList<'a>, ReadError>>
pub fn layer_list(&self) -> Option<Result<LayerList<'a>, ReadError>>
Attempt to resolve layer_list_offset
.
Sourcepub fn clip_list_offset(&self) -> Option<Nullable<Offset32>>
pub fn clip_list_offset(&self) -> Option<Nullable<Offset32>>
Offset to ClipList table (may be NULL).
Sourcepub fn clip_list(&self) -> Option<Result<ClipList<'a>, ReadError>>
pub fn clip_list(&self) -> Option<Result<ClipList<'a>, ReadError>>
Attempt to resolve clip_list_offset
.
Sourcepub fn var_index_map_offset(&self) -> Option<Nullable<Offset32>>
pub fn var_index_map_offset(&self) -> Option<Nullable<Offset32>>
Offset to DeltaSetIndexMap table (may be NULL).
Sourcepub fn var_index_map(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn var_index_map(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve var_index_map_offset
.
Sourcepub fn item_variation_store_offset(&self) -> Option<Nullable<Offset32>>
pub fn item_variation_store_offset(&self) -> Option<Nullable<Offset32>>
Offset to ItemVariationStore (may be NULL).
Sourcepub fn item_variation_store(
&self,
) -> Option<Result<ItemVariationStore<'a>, ReadError>>
pub fn item_variation_store( &self, ) -> Option<Result<ItemVariationStore<'a>, ReadError>>
Attempt to resolve item_variation_store_offset
.
Source§impl<'a> TableRef<'a, BaseGlyphListMarker>
impl<'a> TableRef<'a, BaseGlyphListMarker>
pub fn num_base_glyph_paint_records(&self) -> u32
pub fn base_glyph_paint_records(&self) -> &'a [BaseGlyphPaint]
Source§impl<'a> TableRef<'a, LayerListMarker>
impl<'a> TableRef<'a, LayerListMarker>
pub fn num_layers(&self) -> u32
Sourcepub fn paint_offsets(&self) -> &'a [BigEndian<Offset32>]
pub fn paint_offsets(&self) -> &'a [BigEndian<Offset32>]
Offsets to Paint tables.
Sourcepub fn paints(&self) -> ArrayOfOffsets<'a, Paint<'a>, Offset32>
pub fn paints(&self) -> ArrayOfOffsets<'a, Paint<'a>, Offset32>
A dynamically resolving wrapper for paint_offsets
.
Source§impl<'a> TableRef<'a, ClipBoxFormat2Marker>
impl<'a> TableRef<'a, ClipBoxFormat2Marker>
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, VarColorLineMarker>
impl<'a> TableRef<'a, VarColorLineMarker>
Sourcepub fn color_stops(&self) -> &'a [VarColorStop]
pub fn color_stops(&self) -> &'a [VarColorStop]
Allows for variations.
Source§impl<'a> TableRef<'a, PaintColrLayersMarker>
impl<'a> TableRef<'a, PaintColrLayersMarker>
Sourcepub fn num_layers(&self) -> u8
pub fn num_layers(&self) -> u8
Number of offsets to paint tables to read from LayerList.
Sourcepub fn first_layer_index(&self) -> u32
pub fn first_layer_index(&self) -> u32
Index (base 0) into the LayerList.
Source§impl<'a> TableRef<'a, PaintLinearGradientMarker>
impl<'a> TableRef<'a, PaintLinearGradientMarker>
Sourcepub fn color_line_offset(&self) -> Offset24
pub fn color_line_offset(&self) -> Offset24
Offset to ColorLine table.
Sourcepub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>
pub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>
Attempt to resolve color_line_offset
.
Source§impl<'a> TableRef<'a, PaintVarLinearGradientMarker>
impl<'a> TableRef<'a, PaintVarLinearGradientMarker>
Sourcepub fn color_line_offset(&self) -> Offset24
pub fn color_line_offset(&self) -> Offset24
Offset to VarColorLine table.
Sourcepub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>
pub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>
Attempt to resolve color_line_offset
.
Sourcepub fn x2(&self) -> FWord
pub fn x2(&self) -> FWord
Rotation point (p₂) x coordinate. For variation, use varIndexBase + 4.
Sourcepub fn y2(&self) -> FWord
pub fn y2(&self) -> FWord
Rotation point (p₂) y coordinate. For variation, use varIndexBase + 5.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintRadialGradientMarker>
impl<'a> TableRef<'a, PaintRadialGradientMarker>
Sourcepub fn color_line_offset(&self) -> Offset24
pub fn color_line_offset(&self) -> Offset24
Offset to ColorLine table.
Sourcepub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>
pub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>
Attempt to resolve color_line_offset
.
Source§impl<'a> TableRef<'a, PaintVarRadialGradientMarker>
impl<'a> TableRef<'a, PaintVarRadialGradientMarker>
Sourcepub fn color_line_offset(&self) -> Offset24
pub fn color_line_offset(&self) -> Offset24
Offset to VarColorLine table.
Sourcepub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>
pub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>
Attempt to resolve color_line_offset
.
Sourcepub fn x0(&self) -> FWord
pub fn x0(&self) -> FWord
Start circle center x coordinate. For variation, use varIndexBase + 0.
Sourcepub fn y0(&self) -> FWord
pub fn y0(&self) -> FWord
Start circle center y coordinate. For variation, use varIndexBase + 1.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintSweepGradientMarker>
impl<'a> TableRef<'a, PaintSweepGradientMarker>
Sourcepub fn color_line_offset(&self) -> Offset24
pub fn color_line_offset(&self) -> Offset24
Offset to ColorLine table.
Sourcepub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>
pub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>
Attempt to resolve color_line_offset
.
Sourcepub fn start_angle(&self) -> F2Dot14
pub fn start_angle(&self) -> F2Dot14
Start of the angular range of the gradient, 180° in counter-clockwise degrees per 1.0 of value.
Source§impl<'a> TableRef<'a, PaintVarSweepGradientMarker>
impl<'a> TableRef<'a, PaintVarSweepGradientMarker>
Sourcepub fn color_line_offset(&self) -> Offset24
pub fn color_line_offset(&self) -> Offset24
Offset to VarColorLine table.
Sourcepub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>
pub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>
Attempt to resolve color_line_offset
.
Sourcepub fn start_angle(&self) -> F2Dot14
pub fn start_angle(&self) -> F2Dot14
Start of the angular range of the gradient, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 2.
Sourcepub fn end_angle(&self) -> F2Dot14
pub fn end_angle(&self) -> F2Dot14
End of the angular range of the gradient, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 3.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintTransformMarker>
impl<'a> TableRef<'a, PaintTransformMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn transform_offset(&self) -> Offset24
pub fn transform_offset(&self) -> Offset24
Offset to an Affine2x3 table.
Source§impl<'a> TableRef<'a, PaintVarTransformMarker>
impl<'a> TableRef<'a, PaintVarTransformMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn transform_offset(&self) -> Offset24
pub fn transform_offset(&self) -> Offset24
Offset to a VarAffine2x3 table.
Sourcepub fn transform(&self) -> Result<VarAffine2x3<'a>, ReadError>
pub fn transform(&self) -> Result<VarAffine2x3<'a>, ReadError>
Attempt to resolve transform_offset
.
Source§impl<'a> TableRef<'a, VarAffine2x3Marker>
impl<'a> TableRef<'a, VarAffine2x3Marker>
Sourcepub fn xx(&self) -> Fixed
pub fn xx(&self) -> Fixed
x-component of transformed x-basis vector. For variation, use varIndexBase + 0.
Sourcepub fn yx(&self) -> Fixed
pub fn yx(&self) -> Fixed
y-component of transformed x-basis vector. For variation, use varIndexBase + 1.
Sourcepub fn xy(&self) -> Fixed
pub fn xy(&self) -> Fixed
x-component of transformed y-basis vector. For variation, use varIndexBase + 2.
Sourcepub fn yy(&self) -> Fixed
pub fn yy(&self) -> Fixed
y-component of transformed y-basis vector. For variation, use varIndexBase + 3.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintTranslateMarker>
impl<'a> TableRef<'a, PaintTranslateMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Source§impl<'a> TableRef<'a, PaintVarTranslateMarker>
impl<'a> TableRef<'a, PaintVarTranslateMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintScaleMarker>
impl<'a> TableRef<'a, PaintScaleMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Source§impl<'a> TableRef<'a, PaintVarScaleMarker>
impl<'a> TableRef<'a, PaintVarScaleMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn scale_x(&self) -> F2Dot14
pub fn scale_x(&self) -> F2Dot14
Scale factor in x direction. For variation, use varIndexBase + 0.
Sourcepub fn scale_y(&self) -> F2Dot14
pub fn scale_y(&self) -> F2Dot14
Scale factor in y direction. For variation, use varIndexBase + 1.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintScaleAroundCenterMarker>
impl<'a> TableRef<'a, PaintScaleAroundCenterMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Source§impl<'a> TableRef<'a, PaintVarScaleAroundCenterMarker>
impl<'a> TableRef<'a, PaintVarScaleAroundCenterMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn scale_x(&self) -> F2Dot14
pub fn scale_x(&self) -> F2Dot14
Scale factor in x direction. For variation, use varIndexBase + 0.
Sourcepub fn scale_y(&self) -> F2Dot14
pub fn scale_y(&self) -> F2Dot14
Scale factor in y direction. For variation, use varIndexBase + 1.
Sourcepub fn center_x(&self) -> FWord
pub fn center_x(&self) -> FWord
x coordinate for the center of scaling. For variation, use varIndexBase + 2.
Sourcepub fn center_y(&self) -> FWord
pub fn center_y(&self) -> FWord
y coordinate for the center of scaling. For variation, use varIndexBase + 3.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintVarScaleUniformMarker>
impl<'a> TableRef<'a, PaintVarScaleUniformMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn scale(&self) -> F2Dot14
pub fn scale(&self) -> F2Dot14
Scale factor in x and y directions. For variation, use varIndexBase + 0.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintScaleUniformAroundCenterMarker>
impl<'a> TableRef<'a, PaintScaleUniformAroundCenterMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Source§impl<'a> TableRef<'a, PaintVarScaleUniformAroundCenterMarker>
impl<'a> TableRef<'a, PaintVarScaleUniformAroundCenterMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn scale(&self) -> F2Dot14
pub fn scale(&self) -> F2Dot14
Scale factor in x and y directions. For variation, use varIndexBase + 0.
Sourcepub fn center_x(&self) -> FWord
pub fn center_x(&self) -> FWord
x coordinate for the center of scaling. For variation, use varIndexBase + 1.
Sourcepub fn center_y(&self) -> FWord
pub fn center_y(&self) -> FWord
y coordinate for the center of scaling. For variation, use varIndexBase + 2.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintRotateMarker>
impl<'a> TableRef<'a, PaintRotateMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Source§impl<'a> TableRef<'a, PaintVarRotateMarker>
impl<'a> TableRef<'a, PaintVarRotateMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn angle(&self) -> F2Dot14
pub fn angle(&self) -> F2Dot14
Rotation angle, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 0.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintRotateAroundCenterMarker>
impl<'a> TableRef<'a, PaintRotateAroundCenterMarker>
Source§impl<'a> TableRef<'a, PaintVarRotateAroundCenterMarker>
impl<'a> TableRef<'a, PaintVarRotateAroundCenterMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn angle(&self) -> F2Dot14
pub fn angle(&self) -> F2Dot14
Rotation angle, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 0.
Sourcepub fn center_x(&self) -> FWord
pub fn center_x(&self) -> FWord
x coordinate for the center of rotation. For variation, use varIndexBase + 1.
Sourcepub fn center_y(&self) -> FWord
pub fn center_y(&self) -> FWord
y coordinate for the center of rotation. For variation, use varIndexBase + 2.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintSkewMarker>
impl<'a> TableRef<'a, PaintSkewMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn x_skew_angle(&self) -> F2Dot14
pub fn x_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the x-axis, 180° in counter-clockwise degrees per 1.0 of value.
Sourcepub fn y_skew_angle(&self) -> F2Dot14
pub fn y_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the y-axis, 180° in counter-clockwise degrees per 1.0 of value.
Source§impl<'a> TableRef<'a, PaintVarSkewMarker>
impl<'a> TableRef<'a, PaintVarSkewMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn x_skew_angle(&self) -> F2Dot14
pub fn x_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the x-axis, 180° ┬░ in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 0.
Sourcepub fn y_skew_angle(&self) -> F2Dot14
pub fn y_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the y-axis, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 1.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintSkewAroundCenterMarker>
impl<'a> TableRef<'a, PaintSkewAroundCenterMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn x_skew_angle(&self) -> F2Dot14
pub fn x_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the x-axis, 180° in counter-clockwise degrees per 1.0 of value.
Sourcepub fn y_skew_angle(&self) -> F2Dot14
pub fn y_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the y-axis, 180° in counter-clockwise degrees per 1.0 of value.
Source§impl<'a> TableRef<'a, PaintVarSkewAroundCenterMarker>
impl<'a> TableRef<'a, PaintVarSkewAroundCenterMarker>
Sourcepub fn paint_offset(&self) -> Offset24
pub fn paint_offset(&self) -> Offset24
Offset to a Paint subtable.
Sourcepub fn x_skew_angle(&self) -> F2Dot14
pub fn x_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the x-axis, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 0.
Sourcepub fn y_skew_angle(&self) -> F2Dot14
pub fn y_skew_angle(&self) -> F2Dot14
Angle of skew in the direction of the y-axis, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 1.
Sourcepub fn center_x(&self) -> FWord
pub fn center_x(&self) -> FWord
x coordinate for the center of rotation. For variation, use varIndexBase + 2.
Sourcepub fn center_y(&self) -> FWord
pub fn center_y(&self) -> FWord
y coordinate for the center of rotation. For variation, use varIndexBase + 3.
Sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Source§impl<'a> TableRef<'a, PaintCompositeMarker>
impl<'a> TableRef<'a, PaintCompositeMarker>
Sourcepub fn source_paint_offset(&self) -> Offset24
pub fn source_paint_offset(&self) -> Offset24
Offset to a source Paint table.
Sourcepub fn source_paint(&self) -> Result<Paint<'a>, ReadError>
pub fn source_paint(&self) -> Result<Paint<'a>, ReadError>
Attempt to resolve source_paint_offset
.
Sourcepub fn composite_mode(&self) -> CompositeMode
pub fn composite_mode(&self) -> CompositeMode
A CompositeMode enumeration value.
Sourcepub fn backdrop_paint_offset(&self) -> Offset24
pub fn backdrop_paint_offset(&self) -> Offset24
Offset to a backdrop Paint table.
Sourcepub fn backdrop_paint(&self) -> Result<Paint<'a>, ReadError>
pub fn backdrop_paint(&self) -> Result<Paint<'a>, ReadError>
Attempt to resolve backdrop_paint_offset
.
Source§impl<'a> TableRef<'a, ColrMarker>
impl<'a> TableRef<'a, ColrMarker>
Sourcepub fn v0_base_glyph(
&self,
glyph_id: GlyphId,
) -> Result<Option<Range<usize>>, ReadError>
pub fn v0_base_glyph( &self, glyph_id: GlyphId, ) -> Result<Option<Range<usize>>, ReadError>
Returns the COLRv0 base glyph for the given glyph identifier.
The return value is a range of layer indices that can be passed to
v0_layer
to retrieve the layer glyph identifiers
and palette color indices.
Sourcepub fn v0_layer(&self, index: usize) -> Result<(GlyphId16, u16), ReadError>
pub fn v0_layer(&self, index: usize) -> Result<(GlyphId16, u16), ReadError>
Returns the COLRv0 layer at the given index.
The layer is represented by a tuple containing the glyph identifier of the associated outline and the palette color index.
Sourcepub fn v1_base_glyph(
&self,
glyph_id: GlyphId,
) -> Result<Option<(Paint<'a>, PaintId)>, ReadError>
pub fn v1_base_glyph( &self, glyph_id: GlyphId, ) -> Result<Option<(Paint<'a>, PaintId)>, ReadError>
Returns the COLRv1 base glyph for the given glyph identifier.
The second value in the tuple is a unique identifier for the paint that may be used to detect recursion in the paint graph.
Source§impl<'a> TableRef<'a, CpalMarker>
impl<'a> TableRef<'a, CpalMarker>
Sourcepub fn num_palette_entries(&self) -> u16
pub fn num_palette_entries(&self) -> u16
Number of palette entries in each palette.
Sourcepub fn num_palettes(&self) -> u16
pub fn num_palettes(&self) -> u16
Number of palettes in the table.
Sourcepub fn num_color_records(&self) -> u16
pub fn num_color_records(&self) -> u16
Total number of color records, combined for all palettes.
Sourcepub fn color_records_array_offset(&self) -> Nullable<Offset32>
pub fn color_records_array_offset(&self) -> Nullable<Offset32>
Offset from the beginning of CPAL table to the first ColorRecord.
Sourcepub fn color_records_array(
&self,
) -> Option<Result<&'a [ColorRecord], ReadError>>
pub fn color_records_array( &self, ) -> Option<Result<&'a [ColorRecord], ReadError>>
Attempt to resolve color_records_array_offset
.
Sourcepub fn color_record_indices(&self) -> &'a [BigEndian<u16>]
pub fn color_record_indices(&self) -> &'a [BigEndian<u16>]
Index of each palette’s first color record in the combined color record array.
Sourcepub fn palette_types_array_offset(&self) -> Option<Nullable<Offset32>>
pub fn palette_types_array_offset(&self) -> Option<Nullable<Offset32>>
Offset from the beginning of CPAL table to the Palette Types Array.
This is an array of 32-bit flag fields that describe properties of each palette.
Sourcepub fn palette_types_array(
&self,
) -> Option<Result<&'a [BigEndian<PaletteType>], ReadError>>
pub fn palette_types_array( &self, ) -> Option<Result<&'a [BigEndian<PaletteType>], ReadError>>
Attempt to resolve palette_types_array_offset
.
Sourcepub fn palette_labels_array_offset(&self) -> Option<Nullable<Offset32>>
pub fn palette_labels_array_offset(&self) -> Option<Nullable<Offset32>>
Offset from the beginning of CPAL table to the Palette Labels Array.
This is an array of ‘name’ table IDs (typically in the font-specific name ID range) that specify user interface strings associated with each palette. Use 0xFFFF if no name ID is provided for a palette.
Sourcepub fn palette_labels_array(
&self,
) -> Option<Result<&'a [BigEndian<u16>], ReadError>>
pub fn palette_labels_array( &self, ) -> Option<Result<&'a [BigEndian<u16>], ReadError>>
Attempt to resolve palette_labels_array_offset
.
Sourcepub fn palette_entry_labels_array_offset(&self) -> Option<Nullable<Offset32>>
pub fn palette_entry_labels_array_offset(&self) -> Option<Nullable<Offset32>>
Offset from the beginning of CPAL table to the Palette Entry Labels Array.
This is an array of ‘name’ table IDs (typically in the font-specific name ID range) that specify user interface strings associated with each palette entry, e.g. “Outline”, “Fill”. This set of palette entry labels applies to all palettes in the font. Use 0xFFFF if no name ID is provided for a palette entry.
Sourcepub fn palette_entry_labels_array(
&self,
) -> Option<Result<&'a [BigEndian<NameId>], ReadError>>
pub fn palette_entry_labels_array( &self, ) -> Option<Result<&'a [BigEndian<NameId>], ReadError>>
Attempt to resolve palette_entry_labels_array_offset
.
Source§impl<'a> TableRef<'a, CvarMarker>
impl<'a> TableRef<'a, CvarMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major/minor version number of the CVT variations table — set to (1,0).
Sourcepub fn tuple_variation_count(&self) -> TupleVariationCount
pub fn tuple_variation_count(&self) -> TupleVariationCount
A packed field. The high 4 bits are flags, and the low 12 bits are the number of tuple variation tables for this glyph. The number of tuple variation tables can be any number between 1 and 4095.
Sourcepub fn data_offset(&self) -> Offset16
pub fn data_offset(&self) -> Offset16
Offset from the start of the ‘cvar’ table to the serialized data.
Sourcepub fn tuple_variation_headers(
&self,
) -> VarLenArray<'a, TupleVariationHeader<'_>>
pub fn tuple_variation_headers( &self, ) -> VarLenArray<'a, TupleVariationHeader<'_>>
Array of tuple variation headers.
Source§impl<'a> TableRef<'a, CvarMarker>
impl<'a> TableRef<'a, CvarMarker>
Sourcepub fn variation_data(
&self,
axis_count: u16,
) -> Result<CvtVariationData<'a>, ReadError>
pub fn variation_data( &self, axis_count: u16, ) -> Result<CvtVariationData<'a>, ReadError>
Returns the variation data containing the tuples and deltas for the control value table.
This table doesn’t contain an axis count field so this must be provided
by the user and can be read from the fvar
table.
Sourcepub fn deltas(
&self,
axis_count: u16,
coords: &[F2Dot14],
deltas: &mut [i32],
) -> Result<(), ReadError>
pub fn deltas( &self, axis_count: u16, coords: &[F2Dot14], deltas: &mut [i32], ) -> Result<(), ReadError>
Computes the accumulated deltas for the given set of normalized
coordinates and stores them in deltas
.
The axis_count
parameter expects the value from the fvar
table.
The deltas
slice should have a length greater than or equal
to the number of values in the cvt
table. The values are
computed in 16.16 format.
Source§impl<'a> TableRef<'a, EbdtMarker>
impl<'a> TableRef<'a, EbdtMarker>
Sourcepub fn major_version(&self) -> u16
pub fn major_version(&self) -> u16
Major version of the EBDT table, = 2.
Sourcepub fn minor_version(&self) -> u16
pub fn minor_version(&self) -> u16
Minor version of EBDT table, = 0.
Source§impl<'a> TableRef<'a, EbdtMarker>
impl<'a> TableRef<'a, EbdtMarker>
pub fn data( &self, location: &BitmapLocation, ) -> Result<BitmapData<'a>, ReadError>
Source§impl<'a> TableRef<'a, EblcMarker>
impl<'a> TableRef<'a, EblcMarker>
Sourcepub fn major_version(&self) -> u16
pub fn major_version(&self) -> u16
Major version of the EBLC table, = 2.
Sourcepub fn minor_version(&self) -> u16
pub fn minor_version(&self) -> u16
Minor version of EBLC table, = 0.
Sourcepub fn bitmap_sizes(&self) -> &'a [BitmapSize]
pub fn bitmap_sizes(&self) -> &'a [BitmapSize]
BitmapSize records array.
Source§impl<'a> TableRef<'a, FeatMarker>
impl<'a> TableRef<'a, FeatMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Version number of the feature name table (0x00010000 for the current version).
Sourcepub fn feature_name_count(&self) -> u16
pub fn feature_name_count(&self) -> u16
The number of entries in the feature name array.
Sourcepub fn names(&self) -> &'a [FeatureName]
pub fn names(&self) -> &'a [FeatureName]
The feature name array, sorted by feature type.
Source§impl<'a> TableRef<'a, SettingNameArrayMarker>
impl<'a> TableRef<'a, SettingNameArrayMarker>
Sourcepub fn settings(&self) -> &'a [SettingName]
pub fn settings(&self) -> &'a [SettingName]
List of setting names for a feature.
Source§impl TableRef<'_, FeatMarker>
impl TableRef<'_, FeatMarker>
Sourcepub fn find(&self, feature: u16) -> Option<FeatureName>
pub fn find(&self, feature: u16) -> Option<FeatureName>
Returns the name for the given feature code.
Source§impl<'a> TableRef<'a, FvarMarker>
impl<'a> TableRef<'a, FvarMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major version number of the font variations table — set to 1. Minor version number of the font variations table — set to 0.
Sourcepub fn axis_instance_arrays_offset(&self) -> Offset16
pub fn axis_instance_arrays_offset(&self) -> Offset16
Offset in bytes from the beginning of the table to the start of the VariationAxisRecord array. The InstanceRecord array directly follows.
Sourcepub fn axis_instance_arrays(&self) -> Result<AxisInstanceArrays<'a>, ReadError>
pub fn axis_instance_arrays(&self) -> Result<AxisInstanceArrays<'a>, ReadError>
Attempt to resolve axis_instance_arrays_offset
.
Sourcepub fn axis_count(&self) -> u16
pub fn axis_count(&self) -> u16
The number of variation axes in the font (the number of records in the axes array).
Sourcepub fn axis_size(&self) -> u16
pub fn axis_size(&self) -> u16
The size in bytes of each VariationAxisRecord — set to 20 (0x0014) for this version.
Sourcepub fn instance_count(&self) -> u16
pub fn instance_count(&self) -> u16
The number of named instances defined in the font (the number of records in the instances array).
Sourcepub fn instance_size(&self) -> u16
pub fn instance_size(&self) -> u16
The size in bytes of each InstanceRecord — set to either axisCount * sizeof(Fixed) + 4, or to axisCount * sizeof(Fixed) + 6.
Source§impl<'a> TableRef<'a, AxisInstanceArraysMarker>
impl<'a> TableRef<'a, AxisInstanceArraysMarker>
Sourcepub fn axes(&self) -> &'a [VariationAxisRecord]
pub fn axes(&self) -> &'a [VariationAxisRecord]
Variation axis record array.
Sourcepub fn instances(&self) -> ComputedArray<'a, InstanceRecord<'a>>
pub fn instances(&self) -> ComputedArray<'a, InstanceRecord<'a>>
Instance record array.
Source§impl<'a> TableRef<'a, FvarMarker>
impl<'a> TableRef<'a, FvarMarker>
Sourcepub fn axes(&self) -> Result<&'a [VariationAxisRecord], ReadError>
pub fn axes(&self) -> Result<&'a [VariationAxisRecord], ReadError>
Returns the array of variation axis records.
Sourcepub fn instances(
&self,
) -> Result<ComputedArray<'a, InstanceRecord<'a>>, ReadError>
pub fn instances( &self, ) -> Result<ComputedArray<'a, InstanceRecord<'a>>, ReadError>
Returns the array of instance records.
Sourcepub fn user_to_normalized(
&self,
avar: Option<&Avar<'_>>,
user_coords: impl IntoIterator<Item = (Tag, Fixed)>,
normalized_coords: &mut [F2Dot14],
)
pub fn user_to_normalized( &self, avar: Option<&Avar<'_>>, user_coords: impl IntoIterator<Item = (Tag, Fixed)>, normalized_coords: &mut [F2Dot14], )
Converts user space coordinates provided by an unordered iterator
of (tag, value)
pairs to normalized coordinates in axis list order.
Stores the resulting normalized coordinates in the given slice.
- User coordinate tags that don’t match an axis are ignored.
- User coordinate values are clamped to the range of their associated axis before normalization.
- If more than one user coordinate is provided for the same tag, the last one is used.
- If no user coordinate for an axis is provided, the associated coordinate is set to the normalized value 0.0, representing the default location in variation space.
- The length of
normalized_coords
should equal the number of axes present in the this table. If the length is smaller, axes at out of bounds indices are ignored. If the length is larger, the excess entries will be filled with zeros.
If the Avar
table is provided, applies remapping of coordinates
according to the specification.
Source§impl<'a> TableRef<'a, GaspMarker>
impl<'a> TableRef<'a, GaspMarker>
Sourcepub fn num_ranges(&self) -> u16
pub fn num_ranges(&self) -> u16
Number of records to follow
Sourcepub fn gasp_ranges(&self) -> &'a [GaspRange]
pub fn gasp_ranges(&self) -> &'a [GaspRange]
Sorted by ppem
Source§impl<'a> TableRef<'a, GdefMarker>
impl<'a> TableRef<'a, GdefMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
The major/minor version of the GDEF table
Sourcepub fn glyph_class_def_offset(&self) -> Nullable<Offset16>
pub fn glyph_class_def_offset(&self) -> Nullable<Offset16>
Offset to class definition table for glyph type, from beginning of GDEF header (may be NULL)
Sourcepub fn glyph_class_def(&self) -> Option<Result<ClassDef<'a>, ReadError>>
pub fn glyph_class_def(&self) -> Option<Result<ClassDef<'a>, ReadError>>
Attempt to resolve glyph_class_def_offset
.
Sourcepub fn attach_list_offset(&self) -> Nullable<Offset16>
pub fn attach_list_offset(&self) -> Nullable<Offset16>
Offset to attachment point list table, from beginning of GDEF header (may be NULL)
Sourcepub fn attach_list(&self) -> Option<Result<AttachList<'a>, ReadError>>
pub fn attach_list(&self) -> Option<Result<AttachList<'a>, ReadError>>
Attempt to resolve attach_list_offset
.
Sourcepub fn lig_caret_list_offset(&self) -> Nullable<Offset16>
pub fn lig_caret_list_offset(&self) -> Nullable<Offset16>
Offset to ligature caret list table, from beginning of GDEF header (may be NULL)
Sourcepub fn lig_caret_list(&self) -> Option<Result<LigCaretList<'a>, ReadError>>
pub fn lig_caret_list(&self) -> Option<Result<LigCaretList<'a>, ReadError>>
Attempt to resolve lig_caret_list_offset
.
Sourcepub fn mark_attach_class_def_offset(&self) -> Nullable<Offset16>
pub fn mark_attach_class_def_offset(&self) -> Nullable<Offset16>
Offset to class definition table for mark attachment type, from beginning of GDEF header (may be NULL)
Sourcepub fn mark_attach_class_def(&self) -> Option<Result<ClassDef<'a>, ReadError>>
pub fn mark_attach_class_def(&self) -> Option<Result<ClassDef<'a>, ReadError>>
Attempt to resolve mark_attach_class_def_offset
.
Sourcepub fn mark_glyph_sets_def_offset(&self) -> Option<Nullable<Offset16>>
pub fn mark_glyph_sets_def_offset(&self) -> Option<Nullable<Offset16>>
Offset to the table of mark glyph set definitions, from beginning of GDEF header (may be NULL)
Sourcepub fn mark_glyph_sets_def(
&self,
) -> Option<Result<MarkGlyphSets<'a>, ReadError>>
pub fn mark_glyph_sets_def( &self, ) -> Option<Result<MarkGlyphSets<'a>, ReadError>>
Attempt to resolve mark_glyph_sets_def_offset
.
Sourcepub fn item_var_store_offset(&self) -> Option<Nullable<Offset32>>
pub fn item_var_store_offset(&self) -> Option<Nullable<Offset32>>
Offset to the Item Variation Store table, from beginning of GDEF header (may be NULL)
Sourcepub fn item_var_store(
&self,
) -> Option<Result<ItemVariationStore<'a>, ReadError>>
pub fn item_var_store( &self, ) -> Option<Result<ItemVariationStore<'a>, ReadError>>
Attempt to resolve item_var_store_offset
.
Source§impl<'a> TableRef<'a, AttachListMarker>
impl<'a> TableRef<'a, AttachListMarker>
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table - from beginning of AttachList table
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyphs with attachment points
Sourcepub fn attach_point_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn attach_point_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to AttachPoint tables-from beginning of AttachList table-in Coverage Index order
Sourcepub fn attach_points(&self) -> ArrayOfOffsets<'a, AttachPoint<'a>, Offset16>
pub fn attach_points(&self) -> ArrayOfOffsets<'a, AttachPoint<'a>, Offset16>
A dynamically resolving wrapper for attach_point_offsets
.
Source§impl<'a> TableRef<'a, AttachPointMarker>
impl<'a> TableRef<'a, AttachPointMarker>
Sourcepub fn point_count(&self) -> u16
pub fn point_count(&self) -> u16
Number of attachment points on this glyph
Sourcepub fn point_indices(&self) -> &'a [BigEndian<u16>]
pub fn point_indices(&self) -> &'a [BigEndian<u16>]
Array of contour point indices -in increasing numerical order
Source§impl<'a> TableRef<'a, LigCaretListMarker>
impl<'a> TableRef<'a, LigCaretListMarker>
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table - from beginning of LigCaretList table
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn lig_glyph_count(&self) -> u16
pub fn lig_glyph_count(&self) -> u16
Number of ligature glyphs
Sourcepub fn lig_glyph_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn lig_glyph_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to LigGlyph tables, from beginning of LigCaretList table —in Coverage Index order
Sourcepub fn lig_glyphs(&self) -> ArrayOfOffsets<'a, LigGlyph<'a>, Offset16>
pub fn lig_glyphs(&self) -> ArrayOfOffsets<'a, LigGlyph<'a>, Offset16>
A dynamically resolving wrapper for lig_glyph_offsets
.
Source§impl<'a> TableRef<'a, LigGlyphMarker>
impl<'a> TableRef<'a, LigGlyphMarker>
Sourcepub fn caret_count(&self) -> u16
pub fn caret_count(&self) -> u16
Number of CaretValue tables for this ligature (components - 1)
Sourcepub fn caret_value_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn caret_value_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to CaretValue tables, from beginning of LigGlyph table — in increasing coordinate order
Sourcepub fn caret_values(&self) -> ArrayOfOffsets<'a, CaretValue<'a>, Offset16>
pub fn caret_values(&self) -> ArrayOfOffsets<'a, CaretValue<'a>, Offset16>
A dynamically resolving wrapper for caret_value_offsets
.
Source§impl<'a> TableRef<'a, CaretValueFormat1Marker>
impl<'a> TableRef<'a, CaretValueFormat1Marker>
Sourcepub fn caret_value_format(&self) -> u16
pub fn caret_value_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coordinate(&self) -> i16
pub fn coordinate(&self) -> i16
X or Y value, in design units
Source§impl<'a> TableRef<'a, CaretValueFormat2Marker>
impl<'a> TableRef<'a, CaretValueFormat2Marker>
Sourcepub fn caret_value_format(&self) -> u16
pub fn caret_value_format(&self) -> u16
Format identifier: format = 2
Sourcepub fn caret_value_point_index(&self) -> u16
pub fn caret_value_point_index(&self) -> u16
Contour point index on glyph
Source§impl<'a> TableRef<'a, CaretValueFormat3Marker>
impl<'a> TableRef<'a, CaretValueFormat3Marker>
Sourcepub fn caret_value_format(&self) -> u16
pub fn caret_value_format(&self) -> u16
Format identifier-format = 3
Sourcepub fn coordinate(&self) -> i16
pub fn coordinate(&self) -> i16
X or Y value, in design units
Sourcepub fn device_offset(&self) -> Offset16
pub fn device_offset(&self) -> Offset16
Offset to Device table (non-variable font) / Variation Index table (variable font) for X or Y value-from beginning of CaretValue table
Sourcepub fn device(&self) -> Result<DeviceOrVariationIndex<'a>, ReadError>
pub fn device(&self) -> Result<DeviceOrVariationIndex<'a>, ReadError>
Attempt to resolve device_offset
.
Source§impl<'a> TableRef<'a, MarkGlyphSetsMarker>
impl<'a> TableRef<'a, MarkGlyphSetsMarker>
Sourcepub fn mark_glyph_set_count(&self) -> u16
pub fn mark_glyph_set_count(&self) -> u16
Number of mark glyph sets defined
Sourcepub fn coverage_offsets(&self) -> &'a [BigEndian<Offset32>]
pub fn coverage_offsets(&self) -> &'a [BigEndian<Offset32>]
Array of offsets to mark glyph set coverage tables, from the start of the MarkGlyphSets table.
Sourcepub fn coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset32>
pub fn coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset32>
A dynamically resolving wrapper for coverage_offsets
.
Source§impl<'a> TableRef<'a, SimpleGlyphMarker>
impl<'a> TableRef<'a, SimpleGlyphMarker>
Sourcepub fn number_of_contours(&self) -> i16
pub fn number_of_contours(&self) -> i16
If the number of contours is greater than or equal to zero, this is a simple glyph. If negative, this is a composite glyph — the value -1 should be used for composite glyphs.
Sourcepub fn end_pts_of_contours(&self) -> &'a [BigEndian<u16>]
pub fn end_pts_of_contours(&self) -> &'a [BigEndian<u16>]
Array of point indices for the last point of each contour, in increasing numeric order
Sourcepub fn instruction_length(&self) -> u16
pub fn instruction_length(&self) -> u16
Total number of bytes for instructions. If instructionLength is zero, no instructions are present for this glyph, and this field is followed directly by the flags field.
Sourcepub fn instructions(&self) -> &'a [u8] ⓘ
pub fn instructions(&self) -> &'a [u8] ⓘ
Array of instruction byte code for the glyph.
Sourcepub fn glyph_data(&self) -> &'a [u8] ⓘ
pub fn glyph_data(&self) -> &'a [u8] ⓘ
the raw data for flags & x/y coordinates
Source§impl<'a> TableRef<'a, CompositeGlyphMarker>
impl<'a> TableRef<'a, CompositeGlyphMarker>
Sourcepub fn number_of_contours(&self) -> i16
pub fn number_of_contours(&self) -> i16
If the number of contours is greater than or equal to zero, this is a simple glyph. If negative, this is a composite glyph — the value -1 should be used for composite glyphs.
Sourcepub fn component_data(&self) -> &'a [u8] ⓘ
pub fn component_data(&self) -> &'a [u8] ⓘ
component flag glyph index of component
Source§impl<'a> TableRef<'a, SimpleGlyphMarker>
impl<'a> TableRef<'a, SimpleGlyphMarker>
Sourcepub fn num_points(&self) -> usize
pub fn num_points(&self) -> usize
Returns the total number of points.
Sourcepub fn has_overlapping_contours(&self) -> bool
pub fn has_overlapping_contours(&self) -> bool
Returns true if the contours in the simple glyph may overlap.
Sourcepub fn read_points_fast<C: PointCoord>(
&self,
points: &mut [Point<C>],
flags: &mut [PointFlags],
) -> Result<(), ReadError>
pub fn read_points_fast<C: PointCoord>( &self, points: &mut [Point<C>], flags: &mut [PointFlags], ) -> Result<(), ReadError>
Reads points and flags into the provided buffers.
Drops all flag bits except on-curve. The lengths of the buffers must be equal to the value returned by num_points.
§Performance
As the name implies, this is faster than using the iterator returned by points so should be used when it is possible to preallocate buffers.
Sourcepub fn points(&self) -> impl Iterator<Item = CurvePoint> + 'a + Clone
pub fn points(&self) -> impl Iterator<Item = CurvePoint> + 'a + Clone
Returns an iterator over the points in the glyph.
§Performance
This is slower than read_points_fast but provides access to the points without requiring a preallocated buffer.
Source§impl<'a> TableRef<'a, CompositeGlyphMarker>
impl<'a> TableRef<'a, CompositeGlyphMarker>
Sourcepub fn components(&self) -> impl Iterator<Item = Component> + 'a + Clone
pub fn components(&self) -> impl Iterator<Item = Component> + 'a + Clone
Returns an iterator over the components of the composite glyph.
Sourcepub fn component_glyphs_and_flags(
&self,
) -> impl Iterator<Item = (GlyphId16, CompositeGlyphFlags)> + 'a + Clone
pub fn component_glyphs_and_flags( &self, ) -> impl Iterator<Item = (GlyphId16, CompositeGlyphFlags)> + 'a + Clone
Returns an iterator that yields the glyph identifier and flags of each component in the composite glyph.
Sourcepub fn count_and_instructions(&self) -> (usize, Option<&'a [u8]>)
pub fn count_and_instructions(&self) -> (usize, Option<&'a [u8]>)
Returns the component count and TrueType interpreter instructions in a single pass.
Sourcepub fn instructions(&self) -> Option<&'a [u8]>
pub fn instructions(&self) -> Option<&'a [u8]>
Returns the TrueType interpreter instructions.
Source§impl<'a> TableRef<'a, GposMarker>
impl<'a> TableRef<'a, GposMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
The major and minor version of the GPOS table, as a tuple (u16, u16)
Sourcepub fn script_list_offset(&self) -> Offset16
pub fn script_list_offset(&self) -> Offset16
Offset to ScriptList table, from beginning of GPOS table
Sourcepub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>
pub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>
Attempt to resolve script_list_offset
.
Sourcepub fn feature_list_offset(&self) -> Offset16
pub fn feature_list_offset(&self) -> Offset16
Offset to FeatureList table, from beginning of GPOS table
Sourcepub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>
pub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>
Attempt to resolve feature_list_offset
.
Sourcepub fn lookup_list_offset(&self) -> Offset16
pub fn lookup_list_offset(&self) -> Offset16
Offset to LookupList table, from beginning of GPOS table
Sourcepub fn lookup_list(&self) -> Result<PositionLookupList<'a>, ReadError>
pub fn lookup_list(&self) -> Result<PositionLookupList<'a>, ReadError>
Attempt to resolve lookup_list_offset
.
pub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>
Sourcepub fn feature_variations(
&self,
) -> Option<Result<FeatureVariations<'a>, ReadError>>
pub fn feature_variations( &self, ) -> Option<Result<FeatureVariations<'a>, ReadError>>
Attempt to resolve feature_variations_offset
.
Source§impl<'a> TableRef<'a, AnchorFormat1Marker>
impl<'a> TableRef<'a, AnchorFormat1Marker>
Sourcepub fn anchor_format(&self) -> u16
pub fn anchor_format(&self) -> u16
Format identifier, = 1
Sourcepub fn x_coordinate(&self) -> i16
pub fn x_coordinate(&self) -> i16
Horizontal value, in design units
Sourcepub fn y_coordinate(&self) -> i16
pub fn y_coordinate(&self) -> i16
Vertical value, in design units
Source§impl<'a> TableRef<'a, AnchorFormat2Marker>
impl<'a> TableRef<'a, AnchorFormat2Marker>
Sourcepub fn anchor_format(&self) -> u16
pub fn anchor_format(&self) -> u16
Format identifier, = 2
Sourcepub fn x_coordinate(&self) -> i16
pub fn x_coordinate(&self) -> i16
Horizontal value, in design units
Sourcepub fn y_coordinate(&self) -> i16
pub fn y_coordinate(&self) -> i16
Vertical value, in design units
Sourcepub fn anchor_point(&self) -> u16
pub fn anchor_point(&self) -> u16
Index to glyph contour point
Source§impl<'a> TableRef<'a, AnchorFormat3Marker>
impl<'a> TableRef<'a, AnchorFormat3Marker>
Sourcepub fn anchor_format(&self) -> u16
pub fn anchor_format(&self) -> u16
Format identifier, = 3
Sourcepub fn x_coordinate(&self) -> i16
pub fn x_coordinate(&self) -> i16
Horizontal value, in design units
Sourcepub fn y_coordinate(&self) -> i16
pub fn y_coordinate(&self) -> i16
Vertical value, in design units
Sourcepub fn x_device_offset(&self) -> Nullable<Offset16>
pub fn x_device_offset(&self) -> Nullable<Offset16>
Offset to Device table (non-variable font) / VariationIndex table (variable font) for X coordinate, from beginning of Anchor table (may be NULL)
Sourcepub fn x_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn x_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
Attempt to resolve x_device_offset
.
Sourcepub fn y_device_offset(&self) -> Nullable<Offset16>
pub fn y_device_offset(&self) -> Nullable<Offset16>
Offset to Device table (non-variable font) / VariationIndex table (variable font) for Y coordinate, from beginning of Anchor table (may be NULL)
Sourcepub fn y_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
pub fn y_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>
Attempt to resolve y_device_offset
.
Source§impl<'a> TableRef<'a, MarkArrayMarker>
impl<'a> TableRef<'a, MarkArrayMarker>
Sourcepub fn mark_count(&self) -> u16
pub fn mark_count(&self) -> u16
Number of MarkRecords
Sourcepub fn mark_records(&self) -> &'a [MarkRecord]
pub fn mark_records(&self) -> &'a [MarkRecord]
Array of MarkRecords, ordered by corresponding glyphs in the associated mark Coverage table.
Source§impl<'a> TableRef<'a, SinglePosFormat1Marker>
impl<'a> TableRef<'a, SinglePosFormat1Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of SinglePos subtable.
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn value_format(&self) -> ValueFormat
pub fn value_format(&self) -> ValueFormat
Defines the types of data in the ValueRecord.
Sourcepub fn value_record(&self) -> ValueRecord
pub fn value_record(&self) -> ValueRecord
Defines positioning value(s) — applied to all glyphs in the Coverage table.
Source§impl<'a> TableRef<'a, SinglePosFormat2Marker>
impl<'a> TableRef<'a, SinglePosFormat2Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 2
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of SinglePos subtable.
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn value_format(&self) -> ValueFormat
pub fn value_format(&self) -> ValueFormat
Defines the types of data in the ValueRecords.
Sourcepub fn value_count(&self) -> u16
pub fn value_count(&self) -> u16
Number of ValueRecords — must equal glyphCount in the Coverage table.
Sourcepub fn value_records(&self) -> ComputedArray<'a, ValueRecord>
pub fn value_records(&self) -> ComputedArray<'a, ValueRecord>
Array of ValueRecords — positioning values applied to glyphs.
Source§impl<'a> TableRef<'a, PairPosFormat1Marker>
impl<'a> TableRef<'a, PairPosFormat1Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of PairPos subtable.
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn value_format1(&self) -> ValueFormat
pub fn value_format1(&self) -> ValueFormat
Defines the types of data in valueRecord1 — for the first glyph in the pair (may be zero).
Sourcepub fn value_format2(&self) -> ValueFormat
pub fn value_format2(&self) -> ValueFormat
Defines the types of data in valueRecord2 — for the second glyph in the pair (may be zero).
Sourcepub fn pair_set_count(&self) -> u16
pub fn pair_set_count(&self) -> u16
Number of PairSet tables
Sourcepub fn pair_set_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn pair_set_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to PairSet tables. Offsets are from beginning of PairPos subtable, ordered by Coverage Index.
Sourcepub fn pair_sets(&self) -> ArrayOfOffsets<'a, PairSet<'a>, Offset16>
pub fn pair_sets(&self) -> ArrayOfOffsets<'a, PairSet<'a>, Offset16>
A dynamically resolving wrapper for pair_set_offsets
.
Source§impl<'a> TableRef<'a, PairSetMarker>
impl<'a> TableRef<'a, PairSetMarker>
Sourcepub fn read(
data: FontData<'a>,
value_format1: ValueFormat,
value_format2: ValueFormat,
) -> Result<Self, ReadError>
pub fn read( data: FontData<'a>, value_format1: ValueFormat, value_format2: ValueFormat, ) -> Result<Self, ReadError>
A constructor that requires additional arguments.
This type requires some external state in order to be parsed.
Source§impl<'a> TableRef<'a, PairSetMarker>
impl<'a> TableRef<'a, PairSetMarker>
Sourcepub fn pair_value_count(&self) -> u16
pub fn pair_value_count(&self) -> u16
Number of PairValueRecords
Sourcepub fn pair_value_records(&self) -> ComputedArray<'a, PairValueRecord>
pub fn pair_value_records(&self) -> ComputedArray<'a, PairValueRecord>
Array of PairValueRecords, ordered by glyph ID of the second glyph.
Source§impl<'a> TableRef<'a, PairPosFormat2Marker>
impl<'a> TableRef<'a, PairPosFormat2Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 2
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of PairPos subtable.
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn value_format1(&self) -> ValueFormat
pub fn value_format1(&self) -> ValueFormat
ValueRecord definition — for the first glyph of the pair (may be zero).
Sourcepub fn value_format2(&self) -> ValueFormat
pub fn value_format2(&self) -> ValueFormat
ValueRecord definition — for the second glyph of the pair (may be zero).
Sourcepub fn class_def1_offset(&self) -> Offset16
pub fn class_def1_offset(&self) -> Offset16
Offset to ClassDef table, from beginning of PairPos subtable — for the first glyph of the pair.
Sourcepub fn class_def1(&self) -> Result<ClassDef<'a>, ReadError>
pub fn class_def1(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve class_def1_offset
.
Sourcepub fn class_def2_offset(&self) -> Offset16
pub fn class_def2_offset(&self) -> Offset16
Offset to ClassDef table, from beginning of PairPos subtable — for the second glyph of the pair.
Sourcepub fn class_def2(&self) -> Result<ClassDef<'a>, ReadError>
pub fn class_def2(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve class_def2_offset
.
Sourcepub fn class1_count(&self) -> u16
pub fn class1_count(&self) -> u16
Number of classes in classDef1 table — includes Class 0.
Sourcepub fn class2_count(&self) -> u16
pub fn class2_count(&self) -> u16
Number of classes in classDef2 table — includes Class 0.
Sourcepub fn class1_records(&self) -> ComputedArray<'a, Class1Record<'a>>
pub fn class1_records(&self) -> ComputedArray<'a, Class1Record<'a>>
Array of Class1 records, ordered by classes in classDef1.
Source§impl<'a> TableRef<'a, CursivePosFormat1Marker>
impl<'a> TableRef<'a, CursivePosFormat1Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of CursivePos subtable.
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn entry_exit_count(&self) -> u16
pub fn entry_exit_count(&self) -> u16
Number of EntryExit records
Sourcepub fn entry_exit_record(&self) -> &'a [EntryExitRecord]
pub fn entry_exit_record(&self) -> &'a [EntryExitRecord]
Array of EntryExit records, in Coverage index order.
Source§impl<'a> TableRef<'a, MarkBasePosFormat1Marker>
impl<'a> TableRef<'a, MarkBasePosFormat1Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn mark_coverage_offset(&self) -> Offset16
pub fn mark_coverage_offset(&self) -> Offset16
Offset to markCoverage table, from beginning of MarkBasePos subtable.
Sourcepub fn mark_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn mark_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve mark_coverage_offset
.
Sourcepub fn base_coverage_offset(&self) -> Offset16
pub fn base_coverage_offset(&self) -> Offset16
Offset to baseCoverage table, from beginning of MarkBasePos subtable.
Sourcepub fn base_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn base_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve base_coverage_offset
.
Sourcepub fn mark_class_count(&self) -> u16
pub fn mark_class_count(&self) -> u16
Number of classes defined for marks
Sourcepub fn mark_array_offset(&self) -> Offset16
pub fn mark_array_offset(&self) -> Offset16
Offset to MarkArray table, from beginning of MarkBasePos subtable.
Sourcepub fn mark_array(&self) -> Result<MarkArray<'a>, ReadError>
pub fn mark_array(&self) -> Result<MarkArray<'a>, ReadError>
Attempt to resolve mark_array_offset
.
Sourcepub fn base_array_offset(&self) -> Offset16
pub fn base_array_offset(&self) -> Offset16
Offset to BaseArray table, from beginning of MarkBasePos subtable.
Sourcepub fn base_array(&self) -> Result<BaseArray<'a>, ReadError>
pub fn base_array(&self) -> Result<BaseArray<'a>, ReadError>
Attempt to resolve base_array_offset
.
Source§impl<'a> TableRef<'a, BaseArrayMarker>
impl<'a> TableRef<'a, BaseArrayMarker>
Sourcepub fn base_count(&self) -> u16
pub fn base_count(&self) -> u16
Number of BaseRecords
Sourcepub fn base_records(&self) -> ComputedArray<'a, BaseRecord<'a>>
pub fn base_records(&self) -> ComputedArray<'a, BaseRecord<'a>>
Array of BaseRecords, in order of baseCoverage Index.
Source§impl<'a> TableRef<'a, MarkLigPosFormat1Marker>
impl<'a> TableRef<'a, MarkLigPosFormat1Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn mark_coverage_offset(&self) -> Offset16
pub fn mark_coverage_offset(&self) -> Offset16
Offset to markCoverage table, from beginning of MarkLigPos subtable.
Sourcepub fn mark_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn mark_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve mark_coverage_offset
.
Sourcepub fn ligature_coverage_offset(&self) -> Offset16
pub fn ligature_coverage_offset(&self) -> Offset16
Offset to ligatureCoverage table, from beginning of MarkLigPos subtable.
Sourcepub fn ligature_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn ligature_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve ligature_coverage_offset
.
Sourcepub fn mark_class_count(&self) -> u16
pub fn mark_class_count(&self) -> u16
Number of defined mark classes
Sourcepub fn mark_array_offset(&self) -> Offset16
pub fn mark_array_offset(&self) -> Offset16
Offset to MarkArray table, from beginning of MarkLigPos subtable.
Sourcepub fn mark_array(&self) -> Result<MarkArray<'a>, ReadError>
pub fn mark_array(&self) -> Result<MarkArray<'a>, ReadError>
Attempt to resolve mark_array_offset
.
Sourcepub fn ligature_array_offset(&self) -> Offset16
pub fn ligature_array_offset(&self) -> Offset16
Offset to LigatureArray table, from beginning of MarkLigPos subtable.
Sourcepub fn ligature_array(&self) -> Result<LigatureArray<'a>, ReadError>
pub fn ligature_array(&self) -> Result<LigatureArray<'a>, ReadError>
Attempt to resolve ligature_array_offset
.
Source§impl<'a> TableRef<'a, LigatureArrayMarker>
impl<'a> TableRef<'a, LigatureArrayMarker>
Sourcepub fn ligature_count(&self) -> u16
pub fn ligature_count(&self) -> u16
Number of LigatureAttach table offsets
Sourcepub fn ligature_attach_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn ligature_attach_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to LigatureAttach tables. Offsets are from beginning of LigatureArray table, ordered by ligatureCoverage index.
Sourcepub fn ligature_attaches(
&self,
) -> ArrayOfOffsets<'a, LigatureAttach<'a>, Offset16>
pub fn ligature_attaches( &self, ) -> ArrayOfOffsets<'a, LigatureAttach<'a>, Offset16>
A dynamically resolving wrapper for ligature_attach_offsets
.
Source§impl<'a> TableRef<'a, LigatureAttachMarker>
impl<'a> TableRef<'a, LigatureAttachMarker>
Sourcepub fn component_count(&self) -> u16
pub fn component_count(&self) -> u16
Number of ComponentRecords in this ligature
Sourcepub fn component_records(&self) -> ComputedArray<'a, ComponentRecord<'a>>
pub fn component_records(&self) -> ComputedArray<'a, ComponentRecord<'a>>
Array of Component records, ordered in writing direction.
Source§impl<'a> TableRef<'a, MarkMarkPosFormat1Marker>
impl<'a> TableRef<'a, MarkMarkPosFormat1Marker>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn mark1_coverage_offset(&self) -> Offset16
pub fn mark1_coverage_offset(&self) -> Offset16
Offset to Combining Mark Coverage table, from beginning of MarkMarkPos subtable.
Sourcepub fn mark1_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn mark1_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve mark1_coverage_offset
.
Sourcepub fn mark2_coverage_offset(&self) -> Offset16
pub fn mark2_coverage_offset(&self) -> Offset16
Offset to Base Mark Coverage table, from beginning of MarkMarkPos subtable.
Sourcepub fn mark2_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn mark2_coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve mark2_coverage_offset
.
Sourcepub fn mark_class_count(&self) -> u16
pub fn mark_class_count(&self) -> u16
Number of Combining Mark classes defined
Sourcepub fn mark1_array_offset(&self) -> Offset16
pub fn mark1_array_offset(&self) -> Offset16
Offset to MarkArray table for mark1, from beginning of MarkMarkPos subtable.
Sourcepub fn mark1_array(&self) -> Result<MarkArray<'a>, ReadError>
pub fn mark1_array(&self) -> Result<MarkArray<'a>, ReadError>
Attempt to resolve mark1_array_offset
.
Sourcepub fn mark2_array_offset(&self) -> Offset16
pub fn mark2_array_offset(&self) -> Offset16
Offset to Mark2Array table for mark2, from beginning of MarkMarkPos subtable.
Sourcepub fn mark2_array(&self) -> Result<Mark2Array<'a>, ReadError>
pub fn mark2_array(&self) -> Result<Mark2Array<'a>, ReadError>
Attempt to resolve mark2_array_offset
.
Source§impl<'a> TableRef<'a, Mark2ArrayMarker>
impl<'a> TableRef<'a, Mark2ArrayMarker>
Sourcepub fn mark2_count(&self) -> u16
pub fn mark2_count(&self) -> u16
Number of Mark2 records
Sourcepub fn mark2_records(&self) -> ComputedArray<'a, Mark2Record<'a>>
pub fn mark2_records(&self) -> ComputedArray<'a, Mark2Record<'a>>
Array of Mark2Records, in Coverage order.
Source§impl<'a, T> TableRef<'a, ExtensionPosFormat1Marker<T>>
impl<'a, T> TableRef<'a, ExtensionPosFormat1Marker<T>>
Sourcepub fn pos_format(&self) -> u16
pub fn pos_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn extension_lookup_type(&self) -> u16
pub fn extension_lookup_type(&self) -> u16
Lookup type of subtable referenced by extensionOffset (i.e. the extension subtable).
Sourcepub fn extension_offset(&self) -> Offset32
pub fn extension_offset(&self) -> Offset32
Offset to the extension subtable, of lookup type extensionLookupType, relative to the start of the ExtensionPosFormat1 subtable.
Source§impl<'a> TableRef<'a, GsubMarker>
impl<'a> TableRef<'a, GsubMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
The major and minor version of the GSUB table, as a tuple (u16, u16)
Sourcepub fn script_list_offset(&self) -> Offset16
pub fn script_list_offset(&self) -> Offset16
Offset to ScriptList table, from beginning of GSUB table
Sourcepub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>
pub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>
Attempt to resolve script_list_offset
.
Sourcepub fn feature_list_offset(&self) -> Offset16
pub fn feature_list_offset(&self) -> Offset16
Offset to FeatureList table, from beginning of GSUB table
Sourcepub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>
pub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>
Attempt to resolve feature_list_offset
.
Sourcepub fn lookup_list_offset(&self) -> Offset16
pub fn lookup_list_offset(&self) -> Offset16
Offset to LookupList table, from beginning of GSUB table
Sourcepub fn lookup_list(&self) -> Result<SubstitutionLookupList<'a>, ReadError>
pub fn lookup_list(&self) -> Result<SubstitutionLookupList<'a>, ReadError>
Attempt to resolve lookup_list_offset
.
Sourcepub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>
pub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>
Offset to FeatureVariations table, from beginning of the GSUB table (may be NULL)
Sourcepub fn feature_variations(
&self,
) -> Option<Result<FeatureVariations<'a>, ReadError>>
pub fn feature_variations( &self, ) -> Option<Result<FeatureVariations<'a>, ReadError>>
Attempt to resolve feature_variations_offset
.
Source§impl<'a> TableRef<'a, SingleSubstFormat1Marker>
impl<'a> TableRef<'a, SingleSubstFormat1Marker>
Sourcepub fn subst_format(&self) -> u16
pub fn subst_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of substitution subtable
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn delta_glyph_id(&self) -> i16
pub fn delta_glyph_id(&self) -> i16
Add to original glyph ID to get substitute glyph ID
Source§impl<'a> TableRef<'a, SingleSubstFormat2Marker>
impl<'a> TableRef<'a, SingleSubstFormat2Marker>
Sourcepub fn subst_format(&self) -> u16
pub fn subst_format(&self) -> u16
Format identifier: format = 2
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of substitution subtable
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyph IDs in the substituteGlyphIDs array
Sourcepub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
Array of substitute glyph IDs — ordered by Coverage index
Source§impl<'a> TableRef<'a, MultipleSubstFormat1Marker>
impl<'a> TableRef<'a, MultipleSubstFormat1Marker>
Sourcepub fn subst_format(&self) -> u16
pub fn subst_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of substitution subtable
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn sequence_count(&self) -> u16
pub fn sequence_count(&self) -> u16
Number of Sequence table offsets in the sequenceOffsets array
Sourcepub fn sequence_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn sequence_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to Sequence tables. Offsets are from beginning of substitution subtable, ordered by Coverage index
Sourcepub fn sequences(&self) -> ArrayOfOffsets<'a, Sequence<'a>, Offset16>
pub fn sequences(&self) -> ArrayOfOffsets<'a, Sequence<'a>, Offset16>
A dynamically resolving wrapper for sequence_offsets
.
Source§impl<'a> TableRef<'a, SequenceMarker>
impl<'a> TableRef<'a, SequenceMarker>
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyph IDs in the substituteGlyphIDs array. This must always be greater than 0.
Sourcepub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
String of glyph IDs to substitute
Source§impl<'a> TableRef<'a, AlternateSubstFormat1Marker>
impl<'a> TableRef<'a, AlternateSubstFormat1Marker>
Sourcepub fn subst_format(&self) -> u16
pub fn subst_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of substitution subtable
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn alternate_set_count(&self) -> u16
pub fn alternate_set_count(&self) -> u16
Number of AlternateSet tables
Sourcepub fn alternate_set_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn alternate_set_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to AlternateSet tables. Offsets are from beginning of substitution subtable, ordered by Coverage index
Sourcepub fn alternate_sets(&self) -> ArrayOfOffsets<'a, AlternateSet<'a>, Offset16>
pub fn alternate_sets(&self) -> ArrayOfOffsets<'a, AlternateSet<'a>, Offset16>
A dynamically resolving wrapper for alternate_set_offsets
.
Source§impl<'a> TableRef<'a, AlternateSetMarker>
impl<'a> TableRef<'a, AlternateSetMarker>
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyph IDs in the alternateGlyphIDs array
Sourcepub fn alternate_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
pub fn alternate_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
Array of alternate glyph IDs, in arbitrary order
Source§impl<'a> TableRef<'a, LigatureSubstFormat1Marker>
impl<'a> TableRef<'a, LigatureSubstFormat1Marker>
Sourcepub fn subst_format(&self) -> u16
pub fn subst_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of substitution subtable
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn ligature_set_count(&self) -> u16
pub fn ligature_set_count(&self) -> u16
Number of LigatureSet tables
Sourcepub fn ligature_set_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn ligature_set_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to LigatureSet tables. Offsets are from beginning of substitution subtable, ordered by Coverage index
Sourcepub fn ligature_sets(&self) -> ArrayOfOffsets<'a, LigatureSet<'a>, Offset16>
pub fn ligature_sets(&self) -> ArrayOfOffsets<'a, LigatureSet<'a>, Offset16>
A dynamically resolving wrapper for ligature_set_offsets
.
Source§impl<'a> TableRef<'a, LigatureSetMarker>
impl<'a> TableRef<'a, LigatureSetMarker>
Sourcepub fn ligature_count(&self) -> u16
pub fn ligature_count(&self) -> u16
Number of Ligature tables
Sourcepub fn ligature_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn ligature_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to Ligature tables. Offsets are from beginning of LigatureSet table, ordered by preference.
Sourcepub fn ligatures(&self) -> ArrayOfOffsets<'a, Ligature<'a>, Offset16>
pub fn ligatures(&self) -> ArrayOfOffsets<'a, Ligature<'a>, Offset16>
A dynamically resolving wrapper for ligature_offsets
.
Source§impl<'a> TableRef<'a, LigatureMarker>
impl<'a> TableRef<'a, LigatureMarker>
Sourcepub fn ligature_glyph(&self) -> GlyphId16
pub fn ligature_glyph(&self) -> GlyphId16
glyph ID of ligature to substitute
Sourcepub fn component_count(&self) -> u16
pub fn component_count(&self) -> u16
Number of components in the ligature
Sourcepub fn component_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
pub fn component_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
Array of component glyph IDs — start with the second component, ordered in writing direction
Source§impl<'a, T> TableRef<'a, ExtensionSubstFormat1Marker<T>>
impl<'a, T> TableRef<'a, ExtensionSubstFormat1Marker<T>>
Sourcepub fn subst_format(&self) -> u16
pub fn subst_format(&self) -> u16
Format identifier. Set to 1.
Sourcepub fn extension_lookup_type(&self) -> u16
pub fn extension_lookup_type(&self) -> u16
Lookup type of subtable referenced by extensionOffset (that is, the extension subtable).
Sourcepub fn extension_offset(&self) -> Offset32
pub fn extension_offset(&self) -> Offset32
Offset to the extension subtable, of lookup type extensionLookupType, relative to the start of the ExtensionSubstFormat1 subtable.
Source§impl<'a> TableRef<'a, ReverseChainSingleSubstFormat1Marker>
impl<'a> TableRef<'a, ReverseChainSingleSubstFormat1Marker>
Sourcepub fn subst_format(&self) -> u16
pub fn subst_format(&self) -> u16
Format identifier: format = 1
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of substitution subtable.
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn backtrack_glyph_count(&self) -> u16
pub fn backtrack_glyph_count(&self) -> u16
Number of glyphs in the backtrack sequence.
Sourcepub fn backtrack_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn backtrack_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to coverage tables in backtrack sequence, in glyph sequence order.
Sourcepub fn backtrack_coverages(
&self,
) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
pub fn backtrack_coverages( &self, ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
A dynamically resolving wrapper for backtrack_coverage_offsets
.
Sourcepub fn lookahead_glyph_count(&self) -> u16
pub fn lookahead_glyph_count(&self) -> u16
Number of glyphs in lookahead sequence.
Sourcepub fn lookahead_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn lookahead_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to coverage tables in lookahead sequence, in glyph sequence order.
Sourcepub fn lookahead_coverages(
&self,
) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
pub fn lookahead_coverages( &self, ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
A dynamically resolving wrapper for lookahead_coverage_offsets
.
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyph IDs in the substituteGlyphIDs array.
Sourcepub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId16>]
Array of substitute glyph IDs — ordered by Coverage index.
Source§impl<'a> TableRef<'a, GvarMarker>
impl<'a> TableRef<'a, GvarMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major/minor version number of the glyph variations table — set to (1,0).
Sourcepub fn axis_count(&self) -> u16
pub fn axis_count(&self) -> u16
The number of variation axes for this font. This must be the same number as axisCount in the ‘fvar’ table.
The number of shared tuple records. Shared tuple records can be referenced within glyph variation data tables for multiple glyphs, as opposed to other tuple records stored directly within a glyph variation data table.
Offset from the start of this table to the shared tuple records.
Attempt to resolve shared_tuples_offset
.
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
The number of glyphs in this font. This must match the number of glyphs stored elsewhere in the font.
Sourcepub fn flags(&self) -> GvarFlags
pub fn flags(&self) -> GvarFlags
Bit-field that gives the format of the offset array that follows. If bit 0 is clear, the offsets are uint16; if bit 0 is set, the offsets are uint32.
Sourcepub fn glyph_variation_data_array_offset(&self) -> u32
pub fn glyph_variation_data_array_offset(&self) -> u32
Offset from the start of this table to the array of GlyphVariationData tables.
Sourcepub fn glyph_variation_data_offsets(&self) -> ComputedArray<'a, U16Or32>
pub fn glyph_variation_data_offsets(&self) -> ComputedArray<'a, U16Or32>
Offsets from the start of the GlyphVariationData array to each GlyphVariationData table.
pub fn tuples(&self) -> ComputedArray<'a, Tuple<'a>>
Source§impl<'a> TableRef<'a, GlyphVariationDataHeaderMarker>
impl<'a> TableRef<'a, GlyphVariationDataHeaderMarker>
Sourcepub fn tuple_variation_count(&self) -> TupleVariationCount
pub fn tuple_variation_count(&self) -> TupleVariationCount
A packed field. The high 4 bits are flags, and the low 12 bits are the number of tuple variation tables for this glyph. The number of tuple variation tables can be any number between 1 and 4095.
Sourcepub fn serialized_data_offset(&self) -> Offset16
pub fn serialized_data_offset(&self) -> Offset16
Offset from the start of the GlyphVariationData table to the serialized data
Sourcepub fn serialized_data(&self) -> Result<FontData<'a>, ReadError>
pub fn serialized_data(&self) -> Result<FontData<'a>, ReadError>
Attempt to resolve serialized_data_offset
.
Sourcepub fn tuple_variation_headers(
&self,
) -> VarLenArray<'a, TupleVariationHeader<'_>>
pub fn tuple_variation_headers( &self, ) -> VarLenArray<'a, TupleVariationHeader<'_>>
Array of tuple variation headers.
Source§impl<'a> TableRef<'a, GvarMarker>
impl<'a> TableRef<'a, GvarMarker>
pub fn data_for_gid(&self, gid: GlyphId) -> Result<FontData<'a>, ReadError>
Sourcepub fn glyph_variation_data(
&self,
gid: GlyphId,
) -> Result<GlyphVariationData<'a>, ReadError>
pub fn glyph_variation_data( &self, gid: GlyphId, ) -> Result<GlyphVariationData<'a>, ReadError>
Get the variation data for a specific glyph.
Sourcepub fn phantom_point_deltas(
&self,
glyf: &Glyf<'_>,
loca: &Loca<'_>,
coords: &[F2Dot14],
glyph_id: GlyphId,
) -> Result<[Point<Fixed>; 4], ReadError>
pub fn phantom_point_deltas( &self, glyf: &Glyf<'_>, loca: &Loca<'_>, coords: &[F2Dot14], glyph_id: GlyphId, ) -> Result<[Point<Fixed>; 4], ReadError>
Returns the phantom point deltas for the given variation coordinates and glyph identifier.
The resulting array will contain four deltas:
[left, right, top, bottom]
.
Source§impl<'a> TableRef<'a, HdmxMarker>
impl<'a> TableRef<'a, HdmxMarker>
Sourcepub fn num_records(&self) -> u16
pub fn num_records(&self) -> u16
Number of device records.
Sourcepub fn size_device_record(&self) -> u32
pub fn size_device_record(&self) -> u32
Size of device record, 32-bit aligned.
Sourcepub fn records(&self) -> ComputedArray<'a, DeviceRecord<'a>>
pub fn records(&self) -> ComputedArray<'a, DeviceRecord<'a>>
Array of device records.
Source§impl<'a> TableRef<'a, HdmxMarker>
impl<'a> TableRef<'a, HdmxMarker>
Sourcepub fn record_for_size(&self, size: u8) -> Option<DeviceRecord<'a>>
pub fn record_for_size(&self, size: u8) -> Option<DeviceRecord<'a>>
Returns for the device record that exactly matches the given size (as ppem).
Source§impl<'a> TableRef<'a, HeadMarker>
impl<'a> TableRef<'a, HeadMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Version number of the font header table, set to (1, 0)
Sourcepub fn font_revision(&self) -> Fixed
pub fn font_revision(&self) -> Fixed
Set by font manufacturer.
Sourcepub fn checksum_adjustment(&self) -> u32
pub fn checksum_adjustment(&self) -> u32
To compute: set it to 0, sum the entire font as uint32, then store 0xB1B0AFBA - sum. If the font is used as a component in a font collection file, the value of this field will be invalidated by changes to the file structure and font table directory, and must be ignored.
Sourcepub fn magic_number(&self) -> u32
pub fn magic_number(&self) -> u32
Set to 0x5F0F3CF5.
Sourcepub fn units_per_em(&self) -> u16
pub fn units_per_em(&self) -> u16
Set to a value from 16 to 16384. Any value in this range is valid. In fonts that have TrueType outlines, a power of 2 is recommended as this allows performance optimizations in some rasterizers.
Sourcepub fn created(&self) -> LongDateTime
pub fn created(&self) -> LongDateTime
Number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.
Sourcepub fn modified(&self) -> LongDateTime
pub fn modified(&self) -> LongDateTime
Number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.
Sourcepub fn lowest_rec_ppem(&self) -> u16
pub fn lowest_rec_ppem(&self) -> u16
Smallest readable size in pixels.
Sourcepub fn font_direction_hint(&self) -> i16
pub fn font_direction_hint(&self) -> i16
Deprecated (Set to 2).
Sourcepub fn index_to_loc_format(&self) -> i16
pub fn index_to_loc_format(&self) -> i16
0 for short offsets (Offset16), 1 for long (Offset32).
Sourcepub fn glyph_data_format(&self) -> i16
pub fn glyph_data_format(&self) -> i16
0 for current format.
Source§impl<'a> TableRef<'a, HheaMarker>
impl<'a> TableRef<'a, HheaMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
The major/minor version (1, 0)
Sourcepub fn line_gap(&self) -> FWord
pub fn line_gap(&self) -> FWord
Typographic line gap. Negative LineGap values are treated as zero in some legacy platform implementations.
Sourcepub fn advance_width_max(&self) -> UfWord
pub fn advance_width_max(&self) -> UfWord
Maximum advance width value in ‘hmtx’ table.
Sourcepub fn min_left_side_bearing(&self) -> FWord
pub fn min_left_side_bearing(&self) -> FWord
Minimum left sidebearing value in ‘hmtx’ table for glyphs with contours (empty glyphs should be ignored).
Sourcepub fn min_right_side_bearing(&self) -> FWord
pub fn min_right_side_bearing(&self) -> FWord
Minimum right sidebearing value; calculated as min(aw - (lsb + xMax - xMin)) for glyphs with contours (empty glyphs should be ignored).
Sourcepub fn x_max_extent(&self) -> FWord
pub fn x_max_extent(&self) -> FWord
Max(lsb + (xMax-xMin))
Sourcepub fn caret_slope_rise(&self) -> i16
pub fn caret_slope_rise(&self) -> i16
Used to calculate the slope of the cursor (rise/run); 1 for vertical caret, 0 for horizontal.
Sourcepub fn caret_slope_run(&self) -> i16
pub fn caret_slope_run(&self) -> i16
0 for vertical caret, 1 for horizontal.
Sourcepub fn caret_offset(&self) -> i16
pub fn caret_offset(&self) -> i16
The amount by which a slanted highlight on a glyph needs to be shifted to produce the best appearance. Set to 0 for non-slanted fonts
Sourcepub fn metric_data_format(&self) -> i16
pub fn metric_data_format(&self) -> i16
0 for current format.
Sourcepub fn number_of_long_metrics(&self) -> u16
pub fn number_of_long_metrics(&self) -> u16
Number of LongMetric entries in ‘hmtx’/‘vmtx’ table
Source§impl<'a> TableRef<'a, HmtxMarker>
impl<'a> TableRef<'a, HmtxMarker>
Sourcepub fn h_metrics(&self) -> &'a [LongMetric]
pub fn h_metrics(&self) -> &'a [LongMetric]
Paired advance width/height and left/top side bearing values for each glyph. Records are indexed by glyph ID.
Sourcepub fn left_side_bearings(&self) -> &'a [BigEndian<i16>]
pub fn left_side_bearings(&self) -> &'a [BigEndian<i16>]
Leading (left/top) side bearings for glyph IDs greater than or equal to numberOfLongMetrics.
Source§impl<'a> TableRef<'a, HvarMarker>
impl<'a> TableRef<'a, HvarMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major version number of the horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.
Sourcepub fn item_variation_store_offset(&self) -> Offset32
pub fn item_variation_store_offset(&self) -> Offset32
Offset in bytes from the start of this table to the item variation store table.
Sourcepub fn item_variation_store(&self) -> Result<ItemVariationStore<'a>, ReadError>
pub fn item_variation_store(&self) -> Result<ItemVariationStore<'a>, ReadError>
Attempt to resolve item_variation_store_offset
.
Sourcepub fn advance_width_mapping_offset(&self) -> Nullable<Offset32>
pub fn advance_width_mapping_offset(&self) -> Nullable<Offset32>
Offset in bytes from the start of this table to the delta-set index mapping for advance widths (may be NULL).
Sourcepub fn advance_width_mapping(
&self,
) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn advance_width_mapping( &self, ) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve advance_width_mapping_offset
.
Sourcepub fn lsb_mapping_offset(&self) -> Nullable<Offset32>
pub fn lsb_mapping_offset(&self) -> Nullable<Offset32>
Offset in bytes from the start of this table to the delta-set index mapping for left side bearings (may be NULL).
Sourcepub fn lsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn lsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve lsb_mapping_offset
.
Sourcepub fn rsb_mapping_offset(&self) -> Nullable<Offset32>
pub fn rsb_mapping_offset(&self) -> Nullable<Offset32>
Offset in bytes from the start of this table to the delta-set index mapping for right side bearings (may be NULL).
Sourcepub fn rsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn rsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve rsb_mapping_offset
.
Source§impl TableRef<'_, HvarMarker>
impl TableRef<'_, HvarMarker>
Sourcepub fn advance_width_delta(
&self,
glyph_id: GlyphId,
coords: &[F2Dot14],
) -> Result<Fixed, ReadError>
pub fn advance_width_delta( &self, glyph_id: GlyphId, coords: &[F2Dot14], ) -> Result<Fixed, ReadError>
Returns the advance width delta for the specified glyph identifier and normalized variation coordinates.
Source§impl<'a> TableRef<'a, PatchMapFormat1Marker>
impl<'a> TableRef<'a, PatchMapFormat1Marker>
Sourcepub fn compatibility_id(&self) -> CompatibilityId
pub fn compatibility_id(&self) -> CompatibilityId
Unique ID that identifies compatible patches.
Sourcepub fn max_entry_index(&self) -> u16
pub fn max_entry_index(&self) -> u16
Largest entry index which appears in either the glyph map or feature map.
Sourcepub fn max_glyph_map_entry_index(&self) -> u16
pub fn max_glyph_map_entry_index(&self) -> u16
Largest entry index which appears in the glyph map.
pub fn glyph_count(&self) -> Uint24
Sourcepub fn glyph_map_offset(&self) -> Offset32
pub fn glyph_map_offset(&self) -> Offset32
Sub table that maps glyph ids to entry indices.
Sourcepub fn glyph_map(&self) -> Result<GlyphMap<'a>, ReadError>
pub fn glyph_map(&self) -> Result<GlyphMap<'a>, ReadError>
Attempt to resolve glyph_map_offset
.
Sourcepub fn feature_map_offset(&self) -> Nullable<Offset32>
pub fn feature_map_offset(&self) -> Nullable<Offset32>
Sub table that maps feature and glyph ids to entry indices.
Sourcepub fn feature_map(&self) -> Option<Result<FeatureMap<'a>, ReadError>>
pub fn feature_map(&self) -> Option<Result<FeatureMap<'a>, ReadError>>
Attempt to resolve feature_map_offset
.
pub fn applied_entries_bitmap(&self) -> &'a [u8] ⓘ
pub fn uri_template_length(&self) -> u16
pub fn uri_template(&self) -> &'a [u8] ⓘ
Sourcepub fn patch_format(&self) -> u8
pub fn patch_format(&self) -> u8
Patch format number for patches referenced by this mapping.
Source§impl<'a> TableRef<'a, GlyphMapMarker>
impl<'a> TableRef<'a, GlyphMapMarker>
pub fn first_mapped_glyph(&self) -> u16
pub fn entry_index(&self) -> ComputedArray<'a, U8Or16>
Source§impl<'a> TableRef<'a, FeatureMapMarker>
impl<'a> TableRef<'a, FeatureMapMarker>
pub fn feature_count(&self) -> u16
pub fn feature_records(&self) -> ComputedArray<'a, FeatureRecord>
pub fn entry_map_data(&self) -> &'a [u8] ⓘ
Source§impl<'a> TableRef<'a, PatchMapFormat2Marker>
impl<'a> TableRef<'a, PatchMapFormat2Marker>
Sourcepub fn compatibility_id(&self) -> CompatibilityId
pub fn compatibility_id(&self) -> CompatibilityId
Unique ID that identifies compatible patches.
Sourcepub fn default_patch_format(&self) -> u8
pub fn default_patch_format(&self) -> u8
Patch format number for patches referenced by this mapping.
pub fn entry_count(&self) -> Uint24
pub fn entries_offset(&self) -> Offset32
Sourcepub fn entries(&self) -> Result<MappingEntries<'a>, ReadError>
pub fn entries(&self) -> Result<MappingEntries<'a>, ReadError>
Attempt to resolve entries_offset
.
pub fn entry_id_string_data_offset(&self) -> Nullable<Offset32>
Sourcepub fn entry_id_string_data(
&self,
) -> Option<Result<IdStringData<'a>, ReadError>>
pub fn entry_id_string_data( &self, ) -> Option<Result<IdStringData<'a>, ReadError>>
Attempt to resolve entry_id_string_data_offset
.
pub fn uri_template_length(&self) -> u16
pub fn uri_template(&self) -> &'a [u8] ⓘ
Source§impl<'a> TableRef<'a, EntryDataMarker>
impl<'a> TableRef<'a, EntryDataMarker>
pub fn format_flags(&self) -> EntryFormatFlags
pub fn feature_count(&self) -> Option<u8>
pub fn design_space_count(&self) -> Option<u16>
pub fn design_space_segments(&self) -> Option<&'a [DesignSpaceSegment]>
pub fn copy_count(&self) -> Option<u8>
pub fn copy_indices(&self) -> Option<&'a [BigEndian<Uint24>]>
pub fn entry_id_delta(&self) -> Option<IdDeltaOrLength>
pub fn patch_format(&self) -> Option<u8>
pub fn codepoint_data(&self) -> &'a [u8] ⓘ
Source§impl<'a> TableRef<'a, TableKeyedPatchMarker>
impl<'a> TableRef<'a, TableKeyedPatchMarker>
pub fn format(&self) -> Tag
Sourcepub fn compatibility_id(&self) -> CompatibilityId
pub fn compatibility_id(&self) -> CompatibilityId
Unique ID that identifies compatible patches.
pub fn patches_count(&self) -> u16
pub fn patch_offsets(&self) -> &'a [BigEndian<Offset32>]
Sourcepub fn patches(&self) -> ArrayOfOffsets<'a, TablePatch<'a>, Offset32>
pub fn patches(&self) -> ArrayOfOffsets<'a, TablePatch<'a>, Offset32>
A dynamically resolving wrapper for patch_offsets
.
Source§impl<'a> TableRef<'a, TablePatchMarker>
impl<'a> TableRef<'a, TablePatchMarker>
pub fn tag(&self) -> Tag
pub fn flags(&self) -> TablePatchFlags
pub fn max_uncompressed_length(&self) -> u32
pub fn brotli_stream(&self) -> &'a [u8] ⓘ
Source§impl<'a> TableRef<'a, GlyphKeyedPatchMarker>
impl<'a> TableRef<'a, GlyphKeyedPatchMarker>
pub fn format(&self) -> Tag
pub fn flags(&self) -> GlyphKeyedFlags
pub fn compatibility_id(&self) -> CompatibilityId
pub fn max_uncompressed_length(&self) -> u32
pub fn brotli_stream(&self) -> &'a [u8] ⓘ
Source§impl<'a> TableRef<'a, GlyphPatchesMarker>
impl<'a> TableRef<'a, GlyphPatchesMarker>
pub fn glyph_count(&self) -> u32
pub fn table_count(&self) -> u8
pub fn glyph_ids(&self) -> ComputedArray<'a, U16Or24>
pub fn tables(&self) -> &'a [BigEndian<Tag>]
pub fn glyph_data_offsets(&self) -> &'a [BigEndian<Offset32>]
Sourcepub fn glyph_data(&self) -> ArrayOfOffsets<'a, GlyphData<'a>, Offset32>
pub fn glyph_data(&self) -> ArrayOfOffsets<'a, GlyphData<'a>, Offset32>
A dynamically resolving wrapper for glyph_data_offsets
.
Source§impl<'a> TableRef<'a, PatchMapFormat1Marker>
impl<'a> TableRef<'a, PatchMapFormat1Marker>
pub fn gid_to_entry_iter(&'a self) -> impl Iterator<Item = (GlyphId, u16)> + 'a
pub fn entry_count(&self) -> u32
pub fn uri_template_as_string(&self) -> Result<&str, ReadError>
pub fn is_entry_applied(&self, entry_index: u16) -> bool
Source§impl TableRef<'_, PatchMapFormat2Marker>
impl TableRef<'_, PatchMapFormat2Marker>
pub fn uri_template_as_string(&self) -> Result<&str, ReadError>
Source§impl<'a> TableRef<'a, ScriptListMarker>
impl<'a> TableRef<'a, ScriptListMarker>
Sourcepub fn index_for_tag(&self, tag: Tag) -> Option<u16>
pub fn index_for_tag(&self, tag: Tag) -> Option<u16>
Returns the index of the script with the given tag.
Sourcepub fn get(&self, index: u16) -> Result<TaggedElement<Script<'a>>, ReadError>
pub fn get(&self, index: u16) -> Result<TaggedElement<Script<'a>>, ReadError>
Returns the tag and script at the given index.
Sourcepub fn select(&self, tags: &[Tag]) -> Option<SelectedScript>
pub fn select(&self, tags: &[Tag]) -> Option<SelectedScript>
Finds the first available script that matches one of the given tags.
When none of the requested scripts are available, then DFLT
, dflt
and latn
tags are tried in that order.
If you’re starting from a Unicode script code, use the
ScriptTags::from_unicode
function to generate the appropriate set
of tags to pass to this method.
See hb_ot_layout_table_select_script
for the corresponding HarfBuzz function.
Source§impl TableRef<'_, LangSysMarker>
impl TableRef<'_, LangSysMarker>
Sourcepub fn feature_index_for_tag(
&self,
list: &FeatureList<'_>,
tag: Tag,
) -> Option<u16>
pub fn feature_index_for_tag( &self, list: &FeatureList<'_>, tag: Tag, ) -> Option<u16>
Source§impl<'a> TableRef<'a, ScriptListMarker>
impl<'a> TableRef<'a, ScriptListMarker>
Sourcepub fn script_count(&self) -> u16
pub fn script_count(&self) -> u16
Number of ScriptRecords
Sourcepub fn script_records(&self) -> &'a [ScriptRecord]
pub fn script_records(&self) -> &'a [ScriptRecord]
Array of ScriptRecords, listed alphabetically by script tag
Source§impl<'a> TableRef<'a, ScriptMarker>
impl<'a> TableRef<'a, ScriptMarker>
Sourcepub fn default_lang_sys_offset(&self) -> Nullable<Offset16>
pub fn default_lang_sys_offset(&self) -> Nullable<Offset16>
Offset to default LangSys table, from beginning of Script table — may be NULL
Sourcepub fn default_lang_sys(&self) -> Option<Result<LangSys<'a>, ReadError>>
pub fn default_lang_sys(&self) -> Option<Result<LangSys<'a>, ReadError>>
Attempt to resolve default_lang_sys_offset
.
Sourcepub fn lang_sys_count(&self) -> u16
pub fn lang_sys_count(&self) -> u16
Number of LangSysRecords for this script — excluding the default LangSys
Sourcepub fn lang_sys_records(&self) -> &'a [LangSysRecord]
pub fn lang_sys_records(&self) -> &'a [LangSysRecord]
Array of LangSysRecords, listed alphabetically by LangSys tag
Source§impl<'a> TableRef<'a, LangSysMarker>
impl<'a> TableRef<'a, LangSysMarker>
Sourcepub fn required_feature_index(&self) -> u16
pub fn required_feature_index(&self) -> u16
Index of a feature required for this language system; if no required features = 0xFFFF
Sourcepub fn feature_index_count(&self) -> u16
pub fn feature_index_count(&self) -> u16
Number of feature index values for this language system — excludes the required feature
Sourcepub fn feature_indices(&self) -> &'a [BigEndian<u16>]
pub fn feature_indices(&self) -> &'a [BigEndian<u16>]
Array of indices into the FeatureList, in arbitrary order
Source§impl<'a> TableRef<'a, FeatureListMarker>
impl<'a> TableRef<'a, FeatureListMarker>
Sourcepub fn feature_count(&self) -> u16
pub fn feature_count(&self) -> u16
Number of FeatureRecords in this table
Sourcepub fn feature_records(&self) -> &'a [FeatureRecord]
pub fn feature_records(&self) -> &'a [FeatureRecord]
Array of FeatureRecords — zero-based (first feature has FeatureIndex = 0), listed alphabetically by feature tag
Source§impl<'a> TableRef<'a, FeatureMarker>
impl<'a> TableRef<'a, FeatureMarker>
Sourcepub fn feature_params_offset(&self) -> Nullable<Offset16>
pub fn feature_params_offset(&self) -> Nullable<Offset16>
Offset from start of Feature table to FeatureParams table, if defined for the feature and present, else NULL
Sourcepub fn feature_params(&self) -> Option<Result<FeatureParams<'a>, ReadError>>
pub fn feature_params(&self) -> Option<Result<FeatureParams<'a>, ReadError>>
Attempt to resolve feature_params_offset
.
Sourcepub fn lookup_index_count(&self) -> u16
pub fn lookup_index_count(&self) -> u16
Number of LookupList indices for this feature
Sourcepub fn lookup_list_indices(&self) -> &'a [BigEndian<u16>]
pub fn lookup_list_indices(&self) -> &'a [BigEndian<u16>]
Array of indices into the LookupList — zero-based (first lookup is LookupListIndex = 0)
Source§impl<'a, T> TableRef<'a, LookupListMarker<T>>
impl<'a, T> TableRef<'a, LookupListMarker<T>>
Sourcepub fn lookup_count(&self) -> u16
pub fn lookup_count(&self) -> u16
Number of lookups in this table
Sourcepub fn lookup_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn lookup_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to Lookup tables, from beginning of LookupList — zero based (first lookup is Lookup index = 0)
Sourcepub fn lookups(&self) -> ArrayOfOffsets<'a, T, Offset16>where
T: FontRead<'a>,
pub fn lookups(&self) -> ArrayOfOffsets<'a, T, Offset16>where
T: FontRead<'a>,
A dynamically resolving wrapper for lookup_offsets
.
Source§impl<'a, T> TableRef<'a, LookupMarker<T>>
impl<'a, T> TableRef<'a, LookupMarker<T>>
Sourcepub fn lookup_type(&self) -> u16
pub fn lookup_type(&self) -> u16
Different enumerations for GSUB and GPOS
Sourcepub fn lookup_flag(&self) -> LookupFlag
pub fn lookup_flag(&self) -> LookupFlag
Lookup qualifiers
Sourcepub fn sub_table_count(&self) -> u16
pub fn sub_table_count(&self) -> u16
Number of subtables for this lookup
Sourcepub fn subtable_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn subtable_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to lookup subtables, from beginning of Lookup table
Sourcepub fn subtables(&self) -> ArrayOfOffsets<'a, T, Offset16>where
T: FontRead<'a>,
pub fn subtables(&self) -> ArrayOfOffsets<'a, T, Offset16>where
T: FontRead<'a>,
A dynamically resolving wrapper for subtable_offsets
.
Sourcepub fn mark_filtering_set(&self) -> Option<u16>
pub fn mark_filtering_set(&self) -> Option<u16>
Index (base 0) into GDEF mark glyph sets structure. This field is only present if the USE_MARK_FILTERING_SET lookup flag is set.
Source§impl<'a> TableRef<'a, CoverageFormat1Marker>
impl<'a> TableRef<'a, CoverageFormat1Marker>
Sourcepub fn coverage_format(&self) -> u16
pub fn coverage_format(&self) -> u16
Format identifier — format = 1
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyphs in the glyph array
Sourcepub fn glyph_array(&self) -> &'a [BigEndian<GlyphId16>]
pub fn glyph_array(&self) -> &'a [BigEndian<GlyphId16>]
Array of glyph IDs — in numerical order
Source§impl<'a> TableRef<'a, CoverageFormat2Marker>
impl<'a> TableRef<'a, CoverageFormat2Marker>
Sourcepub fn coverage_format(&self) -> u16
pub fn coverage_format(&self) -> u16
Format identifier — format = 2
Sourcepub fn range_count(&self) -> u16
pub fn range_count(&self) -> u16
Number of RangeRecords
Sourcepub fn range_records(&self) -> &'a [RangeRecord]
pub fn range_records(&self) -> &'a [RangeRecord]
Array of glyph ranges — ordered by startGlyphID.
Source§impl<'a> TableRef<'a, ClassDefFormat1Marker>
impl<'a> TableRef<'a, ClassDefFormat1Marker>
Sourcepub fn class_format(&self) -> u16
pub fn class_format(&self) -> u16
Format identifier — format = 1
Sourcepub fn start_glyph_id(&self) -> GlyphId16
pub fn start_glyph_id(&self) -> GlyphId16
First glyph ID of the classValueArray
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Size of the classValueArray
Sourcepub fn class_value_array(&self) -> &'a [BigEndian<u16>]
pub fn class_value_array(&self) -> &'a [BigEndian<u16>]
Array of Class Values — one per glyph ID
Source§impl<'a> TableRef<'a, ClassDefFormat2Marker>
impl<'a> TableRef<'a, ClassDefFormat2Marker>
Sourcepub fn class_format(&self) -> u16
pub fn class_format(&self) -> u16
Format identifier — format = 2
Sourcepub fn class_range_count(&self) -> u16
pub fn class_range_count(&self) -> u16
Number of ClassRangeRecords
Sourcepub fn class_range_records(&self) -> &'a [ClassRangeRecord]
pub fn class_range_records(&self) -> &'a [ClassRangeRecord]
Array of ClassRangeRecords — ordered by startGlyphID
Source§impl<'a> TableRef<'a, SequenceContextFormat1Marker>
impl<'a> TableRef<'a, SequenceContextFormat1Marker>
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of SequenceContextFormat1 table
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn seq_rule_set_count(&self) -> u16
pub fn seq_rule_set_count(&self) -> u16
Number of SequenceRuleSet tables
Sourcepub fn seq_rule_set_offsets(&self) -> &'a [BigEndian<Nullable<Offset16>>]
pub fn seq_rule_set_offsets(&self) -> &'a [BigEndian<Nullable<Offset16>>]
Array of offsets to SequenceRuleSet tables, from beginning of SequenceContextFormat1 table (offsets may be NULL)
Sourcepub fn seq_rule_sets(
&self,
) -> ArrayOfNullableOffsets<'a, SequenceRuleSet<'a>, Offset16>
pub fn seq_rule_sets( &self, ) -> ArrayOfNullableOffsets<'a, SequenceRuleSet<'a>, Offset16>
A dynamically resolving wrapper for seq_rule_set_offsets
.
Source§impl<'a> TableRef<'a, SequenceRuleSetMarker>
impl<'a> TableRef<'a, SequenceRuleSetMarker>
Sourcepub fn seq_rule_count(&self) -> u16
pub fn seq_rule_count(&self) -> u16
Number of SequenceRule tables
Sourcepub fn seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to SequenceRule tables, from beginning of the SequenceRuleSet table
Sourcepub fn seq_rules(&self) -> ArrayOfOffsets<'a, SequenceRule<'a>, Offset16>
pub fn seq_rules(&self) -> ArrayOfOffsets<'a, SequenceRule<'a>, Offset16>
A dynamically resolving wrapper for seq_rule_offsets
.
Source§impl<'a> TableRef<'a, SequenceRuleMarker>
impl<'a> TableRef<'a, SequenceRuleMarker>
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyphs in the input glyph sequence
Sourcepub fn seq_lookup_count(&self) -> u16
pub fn seq_lookup_count(&self) -> u16
Number of SequenceLookupRecords
Sourcepub fn input_sequence(&self) -> &'a [BigEndian<GlyphId16>]
pub fn input_sequence(&self) -> &'a [BigEndian<GlyphId16>]
Array of input glyph IDs—starting with the second glyph
Sourcepub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
Array of Sequence lookup records
Source§impl<'a> TableRef<'a, SequenceContextFormat2Marker>
impl<'a> TableRef<'a, SequenceContextFormat2Marker>
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of SequenceContextFormat2 table
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn class_def_offset(&self) -> Offset16
pub fn class_def_offset(&self) -> Offset16
Offset to ClassDef table, from beginning of SequenceContextFormat2 table
Sourcepub fn class_def(&self) -> Result<ClassDef<'a>, ReadError>
pub fn class_def(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve class_def_offset
.
Sourcepub fn class_seq_rule_set_count(&self) -> u16
pub fn class_seq_rule_set_count(&self) -> u16
Number of ClassSequenceRuleSet tables
Sourcepub fn class_seq_rule_set_offsets(&self) -> &'a [BigEndian<Nullable<Offset16>>]
pub fn class_seq_rule_set_offsets(&self) -> &'a [BigEndian<Nullable<Offset16>>]
Array of offsets to ClassSequenceRuleSet tables, from beginning of SequenceContextFormat2 table (may be NULL)
Sourcepub fn class_seq_rule_sets(
&self,
) -> ArrayOfNullableOffsets<'a, ClassSequenceRuleSet<'a>, Offset16>
pub fn class_seq_rule_sets( &self, ) -> ArrayOfNullableOffsets<'a, ClassSequenceRuleSet<'a>, Offset16>
A dynamically resolving wrapper for class_seq_rule_set_offsets
.
Source§impl<'a> TableRef<'a, ClassSequenceRuleSetMarker>
impl<'a> TableRef<'a, ClassSequenceRuleSetMarker>
Sourcepub fn class_seq_rule_count(&self) -> u16
pub fn class_seq_rule_count(&self) -> u16
Number of ClassSequenceRule tables
Sourcepub fn class_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn class_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to ClassSequenceRule tables, from beginning of ClassSequenceRuleSet table
Sourcepub fn class_seq_rules(
&self,
) -> ArrayOfOffsets<'a, ClassSequenceRule<'a>, Offset16>
pub fn class_seq_rules( &self, ) -> ArrayOfOffsets<'a, ClassSequenceRule<'a>, Offset16>
A dynamically resolving wrapper for class_seq_rule_offsets
.
Source§impl<'a> TableRef<'a, ClassSequenceRuleMarker>
impl<'a> TableRef<'a, ClassSequenceRuleMarker>
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyphs to be matched
Sourcepub fn seq_lookup_count(&self) -> u16
pub fn seq_lookup_count(&self) -> u16
Number of SequenceLookupRecords
Sourcepub fn input_sequence(&self) -> &'a [BigEndian<u16>]
pub fn input_sequence(&self) -> &'a [BigEndian<u16>]
Sequence of classes to be matched to the input glyph sequence, beginning with the second glyph position
Sourcepub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
Array of SequenceLookupRecords
Source§impl<'a> TableRef<'a, SequenceContextFormat3Marker>
impl<'a> TableRef<'a, SequenceContextFormat3Marker>
Sourcepub fn glyph_count(&self) -> u16
pub fn glyph_count(&self) -> u16
Number of glyphs in the input sequence
Sourcepub fn seq_lookup_count(&self) -> u16
pub fn seq_lookup_count(&self) -> u16
Number of SequenceLookupRecords
Sourcepub fn coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to Coverage tables, from beginning of SequenceContextFormat3 subtable
Sourcepub fn coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
pub fn coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
A dynamically resolving wrapper for coverage_offsets
.
Sourcepub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
Array of SequenceLookupRecords
Source§impl<'a> TableRef<'a, ChainedSequenceContextFormat1Marker>
impl<'a> TableRef<'a, ChainedSequenceContextFormat1Marker>
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of ChainSequenceContextFormat1 table
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn chained_seq_rule_set_count(&self) -> u16
pub fn chained_seq_rule_set_count(&self) -> u16
Number of ChainedSequenceRuleSet tables
Sourcepub fn chained_seq_rule_set_offsets(
&self,
) -> &'a [BigEndian<Nullable<Offset16>>]
pub fn chained_seq_rule_set_offsets( &self, ) -> &'a [BigEndian<Nullable<Offset16>>]
Array of offsets to ChainedSeqRuleSet tables, from beginning of ChainedSequenceContextFormat1 table (may be NULL)
Sourcepub fn chained_seq_rule_sets(
&self,
) -> ArrayOfNullableOffsets<'a, ChainedSequenceRuleSet<'a>, Offset16>
pub fn chained_seq_rule_sets( &self, ) -> ArrayOfNullableOffsets<'a, ChainedSequenceRuleSet<'a>, Offset16>
A dynamically resolving wrapper for chained_seq_rule_set_offsets
.
Source§impl<'a> TableRef<'a, ChainedSequenceRuleSetMarker>
impl<'a> TableRef<'a, ChainedSequenceRuleSetMarker>
Sourcepub fn chained_seq_rule_count(&self) -> u16
pub fn chained_seq_rule_count(&self) -> u16
Number of ChainedSequenceRule tables
Sourcepub fn chained_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn chained_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to ChainedSequenceRule tables, from beginning of ChainedSequenceRuleSet table
Sourcepub fn chained_seq_rules(
&self,
) -> ArrayOfOffsets<'a, ChainedSequenceRule<'a>, Offset16>
pub fn chained_seq_rules( &self, ) -> ArrayOfOffsets<'a, ChainedSequenceRule<'a>, Offset16>
A dynamically resolving wrapper for chained_seq_rule_offsets
.
Source§impl<'a> TableRef<'a, ChainedSequenceRuleMarker>
impl<'a> TableRef<'a, ChainedSequenceRuleMarker>
Sourcepub fn backtrack_glyph_count(&self) -> u16
pub fn backtrack_glyph_count(&self) -> u16
Number of glyphs in the backtrack sequence
Sourcepub fn backtrack_sequence(&self) -> &'a [BigEndian<GlyphId16>]
pub fn backtrack_sequence(&self) -> &'a [BigEndian<GlyphId16>]
Array of backtrack glyph IDs
Sourcepub fn input_glyph_count(&self) -> u16
pub fn input_glyph_count(&self) -> u16
Number of glyphs in the input sequence
Sourcepub fn input_sequence(&self) -> &'a [BigEndian<GlyphId16>]
pub fn input_sequence(&self) -> &'a [BigEndian<GlyphId16>]
Array of input glyph IDs—start with second glyph
Sourcepub fn lookahead_glyph_count(&self) -> u16
pub fn lookahead_glyph_count(&self) -> u16
Number of glyphs in the lookahead sequence
Sourcepub fn lookahead_sequence(&self) -> &'a [BigEndian<GlyphId16>]
pub fn lookahead_sequence(&self) -> &'a [BigEndian<GlyphId16>]
Array of lookahead glyph IDs
Sourcepub fn seq_lookup_count(&self) -> u16
pub fn seq_lookup_count(&self) -> u16
Number of SequenceLookupRecords
Sourcepub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
Array of SequenceLookupRecords
Source§impl<'a> TableRef<'a, ChainedSequenceContextFormat2Marker>
impl<'a> TableRef<'a, ChainedSequenceContextFormat2Marker>
Sourcepub fn coverage_offset(&self) -> Offset16
pub fn coverage_offset(&self) -> Offset16
Offset to Coverage table, from beginning of ChainedSequenceContextFormat2 table
Sourcepub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>
Attempt to resolve coverage_offset
.
Sourcepub fn backtrack_class_def_offset(&self) -> Offset16
pub fn backtrack_class_def_offset(&self) -> Offset16
Offset to ClassDef table containing backtrack sequence context, from beginning of ChainedSequenceContextFormat2 table
Sourcepub fn backtrack_class_def(&self) -> Result<ClassDef<'a>, ReadError>
pub fn backtrack_class_def(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve backtrack_class_def_offset
.
Sourcepub fn input_class_def_offset(&self) -> Offset16
pub fn input_class_def_offset(&self) -> Offset16
Offset to ClassDef table containing input sequence context, from beginning of ChainedSequenceContextFormat2 table
Sourcepub fn input_class_def(&self) -> Result<ClassDef<'a>, ReadError>
pub fn input_class_def(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve input_class_def_offset
.
Sourcepub fn lookahead_class_def_offset(&self) -> Offset16
pub fn lookahead_class_def_offset(&self) -> Offset16
Offset to ClassDef table containing lookahead sequence context, from beginning of ChainedSequenceContextFormat2 table
Sourcepub fn lookahead_class_def(&self) -> Result<ClassDef<'a>, ReadError>
pub fn lookahead_class_def(&self) -> Result<ClassDef<'a>, ReadError>
Attempt to resolve lookahead_class_def_offset
.
Sourcepub fn chained_class_seq_rule_set_count(&self) -> u16
pub fn chained_class_seq_rule_set_count(&self) -> u16
Number of ChainedClassSequenceRuleSet tables
Sourcepub fn chained_class_seq_rule_set_offsets(
&self,
) -> &'a [BigEndian<Nullable<Offset16>>]
pub fn chained_class_seq_rule_set_offsets( &self, ) -> &'a [BigEndian<Nullable<Offset16>>]
Array of offsets to ChainedClassSequenceRuleSet tables, from beginning of ChainedSequenceContextFormat2 table (may be NULL)
Sourcepub fn chained_class_seq_rule_sets(
&self,
) -> ArrayOfNullableOffsets<'a, ChainedClassSequenceRuleSet<'a>, Offset16>
pub fn chained_class_seq_rule_sets( &self, ) -> ArrayOfNullableOffsets<'a, ChainedClassSequenceRuleSet<'a>, Offset16>
A dynamically resolving wrapper for chained_class_seq_rule_set_offsets
.
Source§impl<'a> TableRef<'a, ChainedClassSequenceRuleSetMarker>
impl<'a> TableRef<'a, ChainedClassSequenceRuleSetMarker>
Sourcepub fn chained_class_seq_rule_count(&self) -> u16
pub fn chained_class_seq_rule_count(&self) -> u16
Number of ChainedClassSequenceRule tables
Sourcepub fn chained_class_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn chained_class_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to ChainedClassSequenceRule tables, from beginning of ChainedClassSequenceRuleSet
Sourcepub fn chained_class_seq_rules(
&self,
) -> ArrayOfOffsets<'a, ChainedClassSequenceRule<'a>, Offset16>
pub fn chained_class_seq_rules( &self, ) -> ArrayOfOffsets<'a, ChainedClassSequenceRule<'a>, Offset16>
A dynamically resolving wrapper for chained_class_seq_rule_offsets
.
Source§impl<'a> TableRef<'a, ChainedClassSequenceRuleMarker>
impl<'a> TableRef<'a, ChainedClassSequenceRuleMarker>
Sourcepub fn backtrack_glyph_count(&self) -> u16
pub fn backtrack_glyph_count(&self) -> u16
Number of glyphs in the backtrack sequence
Sourcepub fn backtrack_sequence(&self) -> &'a [BigEndian<u16>]
pub fn backtrack_sequence(&self) -> &'a [BigEndian<u16>]
Array of backtrack-sequence classes
Sourcepub fn input_glyph_count(&self) -> u16
pub fn input_glyph_count(&self) -> u16
Total number of glyphs in the input sequence
Sourcepub fn input_sequence(&self) -> &'a [BigEndian<u16>]
pub fn input_sequence(&self) -> &'a [BigEndian<u16>]
Array of input sequence classes, beginning with the second glyph position
Sourcepub fn lookahead_glyph_count(&self) -> u16
pub fn lookahead_glyph_count(&self) -> u16
Number of glyphs in the lookahead sequence
Sourcepub fn lookahead_sequence(&self) -> &'a [BigEndian<u16>]
pub fn lookahead_sequence(&self) -> &'a [BigEndian<u16>]
Array of lookahead-sequence classes
Sourcepub fn seq_lookup_count(&self) -> u16
pub fn seq_lookup_count(&self) -> u16
Number of SequenceLookupRecords
Sourcepub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
Array of SequenceLookupRecords
Source§impl<'a> TableRef<'a, ChainedSequenceContextFormat3Marker>
impl<'a> TableRef<'a, ChainedSequenceContextFormat3Marker>
Sourcepub fn backtrack_glyph_count(&self) -> u16
pub fn backtrack_glyph_count(&self) -> u16
Number of glyphs in the backtrack sequence
Sourcepub fn backtrack_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn backtrack_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to coverage tables for the backtrack sequence
Sourcepub fn backtrack_coverages(
&self,
) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
pub fn backtrack_coverages( &self, ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
A dynamically resolving wrapper for backtrack_coverage_offsets
.
Sourcepub fn input_glyph_count(&self) -> u16
pub fn input_glyph_count(&self) -> u16
Number of glyphs in the input sequence
Sourcepub fn input_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn input_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to coverage tables for the input sequence
Sourcepub fn input_coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
pub fn input_coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
A dynamically resolving wrapper for input_coverage_offsets
.
Sourcepub fn lookahead_glyph_count(&self) -> u16
pub fn lookahead_glyph_count(&self) -> u16
Number of glyphs in the lookahead sequence
Sourcepub fn lookahead_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn lookahead_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to coverage tables for the lookahead sequence
Sourcepub fn lookahead_coverages(
&self,
) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
pub fn lookahead_coverages( &self, ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>
A dynamically resolving wrapper for lookahead_coverage_offsets
.
Sourcepub fn seq_lookup_count(&self) -> u16
pub fn seq_lookup_count(&self) -> u16
Number of SequenceLookupRecords
Sourcepub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]
Array of SequenceLookupRecords
Source§impl<'a> TableRef<'a, DeviceMarker>
impl<'a> TableRef<'a, DeviceMarker>
Sourcepub fn start_size(&self) -> u16
pub fn start_size(&self) -> u16
Smallest size to correct, in ppem
Sourcepub fn delta_format(&self) -> DeltaFormat
pub fn delta_format(&self) -> DeltaFormat
Format of deltaValue array data: 0x0001, 0x0002, or 0x0003
Sourcepub fn delta_value(&self) -> &'a [BigEndian<u16>]
pub fn delta_value(&self) -> &'a [BigEndian<u16>]
Array of compressed data
Source§impl<'a> TableRef<'a, VariationIndexMarker>
impl<'a> TableRef<'a, VariationIndexMarker>
Sourcepub fn delta_set_outer_index(&self) -> u16
pub fn delta_set_outer_index(&self) -> u16
A delta-set outer index — used to select an item variation data subtable within the item variation store.
Sourcepub fn delta_set_inner_index(&self) -> u16
pub fn delta_set_inner_index(&self) -> u16
A delta-set inner index — used to select a delta-set row within an item variation data subtable.
Sourcepub fn delta_format(&self) -> DeltaFormat
pub fn delta_format(&self) -> DeltaFormat
Format, = 0x8000
Source§impl<'a> TableRef<'a, FeatureVariationsMarker>
impl<'a> TableRef<'a, FeatureVariationsMarker>
pub fn version(&self) -> MajorMinor
Sourcepub fn feature_variation_record_count(&self) -> u32
pub fn feature_variation_record_count(&self) -> u32
Number of feature variation records.
Sourcepub fn feature_variation_records(&self) -> &'a [FeatureVariationRecord]
pub fn feature_variation_records(&self) -> &'a [FeatureVariationRecord]
Array of feature variation records.
Source§impl<'a> TableRef<'a, ConditionSetMarker>
impl<'a> TableRef<'a, ConditionSetMarker>
Sourcepub fn condition_count(&self) -> u16
pub fn condition_count(&self) -> u16
Number of conditions for this condition set.
Sourcepub fn condition_offsets(&self) -> &'a [BigEndian<Offset32>]
pub fn condition_offsets(&self) -> &'a [BigEndian<Offset32>]
Array of offsets to condition tables, from beginning of the ConditionSet table.
Sourcepub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset32>
pub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset32>
A dynamically resolving wrapper for condition_offsets
.
Source§impl<'a> TableRef<'a, ConditionFormat1Marker>
impl<'a> TableRef<'a, ConditionFormat1Marker>
Sourcepub fn axis_index(&self) -> u16
pub fn axis_index(&self) -> u16
Index (zero-based) for the variation axis within the ‘fvar’ table.
Sourcepub fn filter_range_min_value(&self) -> F2Dot14
pub fn filter_range_min_value(&self) -> F2Dot14
Minimum value of the font variation instances that satisfy this condition.
Sourcepub fn filter_range_max_value(&self) -> F2Dot14
pub fn filter_range_max_value(&self) -> F2Dot14
Maximum value of the font variation instances that satisfy this condition.
Source§impl<'a> TableRef<'a, ConditionFormat3Marker>
impl<'a> TableRef<'a, ConditionFormat3Marker>
Sourcepub fn condition_count(&self) -> u8
pub fn condition_count(&self) -> u8
Number of conditions.
Sourcepub fn condition_offsets(&self) -> &'a [BigEndian<Offset24>]
pub fn condition_offsets(&self) -> &'a [BigEndian<Offset24>]
Array of condition tables for this conjunction (AND) expression.
Sourcepub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset24>
pub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset24>
A dynamically resolving wrapper for condition_offsets
.
Source§impl<'a> TableRef<'a, ConditionFormat4Marker>
impl<'a> TableRef<'a, ConditionFormat4Marker>
Sourcepub fn condition_count(&self) -> u8
pub fn condition_count(&self) -> u8
Number of conditions.
Sourcepub fn condition_offsets(&self) -> &'a [BigEndian<Offset24>]
pub fn condition_offsets(&self) -> &'a [BigEndian<Offset24>]
Array of condition tables for this disjunction (OR) expression.
Sourcepub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset24>
pub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset24>
A dynamically resolving wrapper for condition_offsets
.
Source§impl<'a> TableRef<'a, FeatureTableSubstitutionMarker>
impl<'a> TableRef<'a, FeatureTableSubstitutionMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major & minor version of the table: (1, 0)
Sourcepub fn substitution_count(&self) -> u16
pub fn substitution_count(&self) -> u16
Number of feature table substitution records.
Sourcepub fn substitutions(&self) -> &'a [FeatureTableSubstitutionRecord]
pub fn substitutions(&self) -> &'a [FeatureTableSubstitutionRecord]
Array of feature table substitution records.
Source§impl<'a> TableRef<'a, SizeParamsMarker>
impl<'a> TableRef<'a, SizeParamsMarker>
Sourcepub fn design_size(&self) -> u16
pub fn design_size(&self) -> u16
The first value represents the design size in 720/inch units (decipoints).
The design size entry must be non-zero. When there is a design size but no recommended size range, the rest of the array will consist of zeros.
Sourcepub fn identifier(&self) -> u16
pub fn identifier(&self) -> u16
The second value has no independent meaning, but serves as an identifier that associates fonts in a subfamily.
All fonts which share a Typographic or Font Family name and which differ only by size range shall have the same subfamily value, and no fonts which differ in weight or style shall have the same subfamily value. If this value is zero, the remaining fields in the array will be ignored.
Sourcepub fn name_entry(&self) -> u16
pub fn name_entry(&self) -> u16
The third value enables applications to use a single name for the subfamily identified by the second value.
If the preceding value is non-zero, this value must be set in the range 256 – 32767 (inclusive). It records the value of a field in the ‘name’ table, which must contain English-language strings encoded in Windows Unicode and Macintosh Roman, and may contain additional strings localized to other scripts and languages. Each of these strings is the name an application should use, in combination with the family name, to represent the subfamily in a menu. Applications will choose the appropriate version based on their selection criteria.
Sourcepub fn range_start(&self) -> u16
pub fn range_start(&self) -> u16
The fourth and fifth values represent the small end of the recommended usage range (exclusive) and the large end of the recommended usage range (inclusive), stored in 720/inch units (decipoints).
Ranges must not overlap, and should generally be contiguous.
pub fn range_end(&self) -> u16
Source§impl<'a> TableRef<'a, StylisticSetParamsMarker>
impl<'a> TableRef<'a, StylisticSetParamsMarker>
pub fn version(&self) -> u16
Sourcepub fn ui_name_id(&self) -> NameId
pub fn ui_name_id(&self) -> NameId
The ‘name’ table name ID that specifies a string (or strings, for multiple languages) for a user-interface label for this feature.
The value of uiLabelNameId is expected to be in the font-specific name ID range (256-32767), though that is not a requirement in this Feature Parameters specification. The user-interface label for the feature can be provided in multiple languages. An English string should be included as a fallback. The string should be kept to a minimal length to fit comfortably with different application interfaces.
Source§impl<'a> TableRef<'a, CharacterVariantParamsMarker>
impl<'a> TableRef<'a, CharacterVariantParamsMarker>
Sourcepub fn feat_ui_label_name_id(&self) -> NameId
pub fn feat_ui_label_name_id(&self) -> NameId
The ‘name’ table name ID that specifies a string (or strings, for multiple languages) for a user-interface label for this feature. (May be NULL.)
Sourcepub fn feat_ui_tooltip_text_name_id(&self) -> NameId
pub fn feat_ui_tooltip_text_name_id(&self) -> NameId
The ‘name’ table name ID that specifies a string (or strings, for multiple languages) that an application can use for tooltip text for this feature. (May be NULL.)
Sourcepub fn sample_text_name_id(&self) -> NameId
pub fn sample_text_name_id(&self) -> NameId
The ‘name’ table name ID that specifies sample text that illustrates the effect of this feature. (May be NULL.)
Sourcepub fn num_named_parameters(&self) -> u16
pub fn num_named_parameters(&self) -> u16
Number of named parameters. (May be zero.)
Sourcepub fn first_param_ui_label_name_id(&self) -> NameId
pub fn first_param_ui_label_name_id(&self) -> NameId
The first ‘name’ table name ID used to specify strings for user-interface labels for the feature parameters. (Must be zero if numParameters is zero.)
Sourcepub fn char_count(&self) -> u16
pub fn char_count(&self) -> u16
The count of characters for which this feature provides glyph variants. (May be zero.)
Source§impl<'a, T: FontRead<'a>> TableRef<'a, LookupMarker<T>>
impl<'a, T: FontRead<'a>> TableRef<'a, LookupMarker<T>>
pub fn get_subtable(&self, offset: Offset16) -> Result<T, ReadError>
Source§impl<'a> TableRef<'a, LtagMarker>
impl<'a> TableRef<'a, LtagMarker>
Number of language tags which follow.
Sourcepub fn tag_ranges(&self) -> &'a [FTStringRange]
pub fn tag_ranges(&self) -> &'a [FTStringRange]
Range of each tag’s string.
Source§impl<'a> TableRef<'a, LtagMarker>
impl<'a> TableRef<'a, LtagMarker>
Sourcepub fn tag_indices(&self) -> impl Iterator<Item = (u32, &'a str)>
pub fn tag_indices(&self) -> impl Iterator<Item = (u32, &'a str)>
Returns an iterator yielding the index and string value of each tag in the table.
Sourcepub fn index_for_tag(&self, tag: &str) -> Option<u32>
pub fn index_for_tag(&self, tag: &str) -> Option<u32>
Returns the index of the given language tag.
Source§impl<'a> TableRef<'a, MaxpMarker>
impl<'a> TableRef<'a, MaxpMarker>
Sourcepub fn version(&self) -> Version16Dot16
pub fn version(&self) -> Version16Dot16
The version: 0x00005000 for version 0.5, 0x00010000 for version 1.0.
Sourcepub fn num_glyphs(&self) -> u16
pub fn num_glyphs(&self) -> u16
The number of glyphs in the font.
Sourcepub fn max_points(&self) -> Option<u16>
pub fn max_points(&self) -> Option<u16>
Maximum points in a non-composite glyph.
Sourcepub fn max_contours(&self) -> Option<u16>
pub fn max_contours(&self) -> Option<u16>
Maximum contours in a non-composite glyph.
Sourcepub fn max_composite_points(&self) -> Option<u16>
pub fn max_composite_points(&self) -> Option<u16>
Maximum points in a composite glyph.
Sourcepub fn max_composite_contours(&self) -> Option<u16>
pub fn max_composite_contours(&self) -> Option<u16>
Maximum contours in a composite glyph.
Sourcepub fn max_zones(&self) -> Option<u16>
pub fn max_zones(&self) -> Option<u16>
1 if instructions do not use the twilight zone (Z0), or 2 if instructions do use Z0; should be set to 2 in most cases.
Sourcepub fn max_twilight_points(&self) -> Option<u16>
pub fn max_twilight_points(&self) -> Option<u16>
Maximum points used in Z0.
Sourcepub fn max_storage(&self) -> Option<u16>
pub fn max_storage(&self) -> Option<u16>
Number of Storage Area locations.
Sourcepub fn max_function_defs(&self) -> Option<u16>
pub fn max_function_defs(&self) -> Option<u16>
Number of FDEFs, equal to the highest function number + 1.
Sourcepub fn max_instruction_defs(&self) -> Option<u16>
pub fn max_instruction_defs(&self) -> Option<u16>
Number of IDEFs.
Sourcepub fn max_stack_elements(&self) -> Option<u16>
pub fn max_stack_elements(&self) -> Option<u16>
Maximum stack depth across Font Program (‘fpgm’ table), CVT Program (‘prep’ table) and all glyph instructions (in the ‘glyf’ table).
Sourcepub fn max_size_of_instructions(&self) -> Option<u16>
pub fn max_size_of_instructions(&self) -> Option<u16>
Maximum byte count for glyph instructions.
Sourcepub fn max_component_elements(&self) -> Option<u16>
pub fn max_component_elements(&self) -> Option<u16>
Maximum number of components referenced at “top level” for any composite glyph.
Sourcepub fn max_component_depth(&self) -> Option<u16>
pub fn max_component_depth(&self) -> Option<u16>
Maximum levels of recursion; 1 for simple components.
Source§impl<'a> TableRef<'a, MetaMarker>
impl<'a> TableRef<'a, MetaMarker>
Sourcepub fn data_maps_count(&self) -> u32
pub fn data_maps_count(&self) -> u32
The number of data maps in the table.
Sourcepub fn data_maps(&self) -> &'a [DataMapRecord]
pub fn data_maps(&self) -> &'a [DataMapRecord]
Array of data map records.
Source§impl<'a> TableRef<'a, MvarMarker>
impl<'a> TableRef<'a, MvarMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major version number of the horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.
Sourcepub fn value_record_size(&self) -> u16
pub fn value_record_size(&self) -> u16
The size in bytes of each value record — must be greater than zero.
Sourcepub fn value_record_count(&self) -> u16
pub fn value_record_count(&self) -> u16
The number of value records — may be zero.
Sourcepub fn item_variation_store_offset(&self) -> Nullable<Offset16>
pub fn item_variation_store_offset(&self) -> Nullable<Offset16>
Offset in bytes from the start of this table to the item variation store table. If valueRecordCount is zero, set to zero; if valueRecordCount is greater than zero, must be greater than zero.
Sourcepub fn item_variation_store(
&self,
) -> Option<Result<ItemVariationStore<'a>, ReadError>>
pub fn item_variation_store( &self, ) -> Option<Result<ItemVariationStore<'a>, ReadError>>
Attempt to resolve item_variation_store_offset
.
Sourcepub fn value_records(&self) -> &'a [ValueRecord]
pub fn value_records(&self) -> &'a [ValueRecord]
Array of value records that identify target items and the associated delta-set index for each. The valueTag records must be in binary order of their valueTag field.
Source§impl<'a> TableRef<'a, NameMarker>
impl<'a> TableRef<'a, NameMarker>
Sourcepub fn storage_offset(&self) -> u16
pub fn storage_offset(&self) -> u16
Offset to start of string storage (from start of table).
Sourcepub fn name_record(&self) -> &'a [NameRecord]
pub fn name_record(&self) -> &'a [NameRecord]
The name records where count is the number of records.
Sourcepub fn lang_tag_count(&self) -> Option<u16>
pub fn lang_tag_count(&self) -> Option<u16>
Number of language-tag records.
Sourcepub fn lang_tag_record(&self) -> Option<&'a [LangTagRecord]>
pub fn lang_tag_record(&self) -> Option<&'a [LangTagRecord]>
The language-tag records where langTagCount is the number of records.
Source§impl<'a> TableRef<'a, NameMarker>
impl<'a> TableRef<'a, NameMarker>
Sourcepub fn string_data(&self) -> FontData<'a>
pub fn string_data(&self) -> FontData<'a>
The FontData containing the encoded name strings.
Source§impl<'a> TableRef<'a, Os2Marker>
impl<'a> TableRef<'a, Os2Marker>
pub fn version(&self) -> u16
Sourcepub fn x_avg_char_width(&self) -> i16
pub fn x_avg_char_width(&self) -> i16
The Average Character Width parameter specifies the arithmetic average of the escapement (width) of all non-zero width glyphs in the font.
Sourcepub fn us_weight_class(&self) -> u16
pub fn us_weight_class(&self) -> u16
Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. Values from 1 to 1000 are valid.
Sourcepub fn us_width_class(&self) -> u16
pub fn us_width_class(&self) -> u16
Indicates a relative change from the normal aspect ratio (width to height ratio) as specified by a font designer for the glyphs in a font.
Sourcepub fn y_subscript_x_size(&self) -> i16
pub fn y_subscript_x_size(&self) -> i16
The recommended horizontal size in font design units for subscripts for this font.
Sourcepub fn y_subscript_y_size(&self) -> i16
pub fn y_subscript_y_size(&self) -> i16
The recommended vertical size in font design units for subscripts for this font.
Sourcepub fn y_subscript_x_offset(&self) -> i16
pub fn y_subscript_x_offset(&self) -> i16
The recommended horizontal offset in font design units for subscripts for this font.
Sourcepub fn y_subscript_y_offset(&self) -> i16
pub fn y_subscript_y_offset(&self) -> i16
The recommended vertical offset in font design units for subscripts for this font.
Sourcepub fn y_superscript_x_size(&self) -> i16
pub fn y_superscript_x_size(&self) -> i16
The recommended horizontal size in font design units for superscripts for this font.
Sourcepub fn y_superscript_y_size(&self) -> i16
pub fn y_superscript_y_size(&self) -> i16
The recommended vertical size in font design units for superscripts for this font.
Sourcepub fn y_superscript_x_offset(&self) -> i16
pub fn y_superscript_x_offset(&self) -> i16
The recommended horizontal offset in font design units for superscripts for this font.
Sourcepub fn y_superscript_y_offset(&self) -> i16
pub fn y_superscript_y_offset(&self) -> i16
The recommended vertical offset in font design units for superscripts for this font.
Sourcepub fn y_strikeout_size(&self) -> i16
pub fn y_strikeout_size(&self) -> i16
Thickness of the strikeout stroke in font design units.
Sourcepub fn y_strikeout_position(&self) -> i16
pub fn y_strikeout_position(&self) -> i16
The position of the top of the strikeout stroke relative to the baseline in font design units.
Sourcepub fn s_family_class(&self) -> i16
pub fn s_family_class(&self) -> i16
Font-family class and subclass. This parameter is a classification of font-family design.
Sourcepub fn panose_10(&self) -> &'a [u8] ⓘ
pub fn panose_10(&self) -> &'a [u8] ⓘ
Additional specifications are required for PANOSE to classify non-Latin character sets.
Sourcepub fn ul_unicode_range_1(&self) -> u32
pub fn ul_unicode_range_1(&self) -> u32
Unicode Character Range (bits 0-31).
Sourcepub fn ul_unicode_range_2(&self) -> u32
pub fn ul_unicode_range_2(&self) -> u32
Unicode Character Range (bits 32-63).
Sourcepub fn ul_unicode_range_3(&self) -> u32
pub fn ul_unicode_range_3(&self) -> u32
Unicode Character Range (bits 64-95).
Sourcepub fn ul_unicode_range_4(&self) -> u32
pub fn ul_unicode_range_4(&self) -> u32
Unicode Character Range (bits 96-127).
Sourcepub fn ach_vend_id(&self) -> Tag
pub fn ach_vend_id(&self) -> Tag
The four-character identifier for the vendor of the given type face.
Sourcepub fn fs_selection(&self) -> SelectionFlags
pub fn fs_selection(&self) -> SelectionFlags
Contains information concerning the nature of the font patterns.
Sourcepub fn us_first_char_index(&self) -> u16
pub fn us_first_char_index(&self) -> u16
The minimum Unicode index (character code) in this font.
Sourcepub fn us_last_char_index(&self) -> u16
pub fn us_last_char_index(&self) -> u16
The maximum Unicode index (character code) in this font.
Sourcepub fn s_typo_ascender(&self) -> i16
pub fn s_typo_ascender(&self) -> i16
The typographic ascender for this font.
Sourcepub fn s_typo_descender(&self) -> i16
pub fn s_typo_descender(&self) -> i16
The typographic descender for this font.
Sourcepub fn s_typo_line_gap(&self) -> i16
pub fn s_typo_line_gap(&self) -> i16
The typographic line gap for this font.
Sourcepub fn us_win_ascent(&self) -> u16
pub fn us_win_ascent(&self) -> u16
The “Windows ascender” metric.
This should be used to specify the height above the baseline for a clipping region.
Sourcepub fn us_win_descent(&self) -> u16
pub fn us_win_descent(&self) -> u16
The “Windows descender” metric.
This should be used to specify the vertical extent below the baseline for a clipping region.
Sourcepub fn ul_code_page_range_1(&self) -> Option<u32>
pub fn ul_code_page_range_1(&self) -> Option<u32>
Code page character range bits 0-31.
Sourcepub fn ul_code_page_range_2(&self) -> Option<u32>
pub fn ul_code_page_range_2(&self) -> Option<u32>
Code page character range bits 32-63.
Sourcepub fn sx_height(&self) -> Option<i16>
pub fn sx_height(&self) -> Option<i16>
This metric specifies the distance between the baseline and the approximate height of non-ascending lowercase letters measured in FUnits.
Sourcepub fn s_cap_height(&self) -> Option<i16>
pub fn s_cap_height(&self) -> Option<i16>
This metric specifies the distance between the baseline and the approximate height of uppercase letters measured in FUnits.
Sourcepub fn us_default_char(&self) -> Option<u16>
pub fn us_default_char(&self) -> Option<u16>
This is the Unicode code point, in UTF-16 encoding, of a character that can be used for a default glyph.
Sourcepub fn us_break_char(&self) -> Option<u16>
pub fn us_break_char(&self) -> Option<u16>
his is the Unicode code point, in UTF-16 encoding, of a character that can be used as a default break character.
Sourcepub fn us_max_context(&self) -> Option<u16>
pub fn us_max_context(&self) -> Option<u16>
This field is used for fonts with multiple optical styles.
Sourcepub fn us_lower_optical_point_size(&self) -> Option<u16>
pub fn us_lower_optical_point_size(&self) -> Option<u16>
This field is used for fonts with multiple optical styles.
Sourcepub fn us_upper_optical_point_size(&self) -> Option<u16>
pub fn us_upper_optical_point_size(&self) -> Option<u16>
This field is used for fonts with multiple optical styles.
Source§impl<'a> TableRef<'a, PostMarker>
impl<'a> TableRef<'a, PostMarker>
Sourcepub fn version(&self) -> Version16Dot16
pub fn version(&self) -> Version16Dot16
0x00010000 for version 1.0 0x00020000 for version 2.0 0x00025000 for version 2.5 (deprecated) 0x00030000 for version 3.0
Sourcepub fn italic_angle(&self) -> Fixed
pub fn italic_angle(&self) -> Fixed
Italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).
Sourcepub fn underline_position(&self) -> FWord
pub fn underline_position(&self) -> FWord
This is the suggested distance of the top of the underline from the baseline (negative values indicate below baseline). The PostScript definition of this FontInfo dictionary key (the y coordinate of the center of the stroke) is not used for historical reasons. The value of the PostScript key may be calculated by subtracting half the underlineThickness from the value of this field.
Sourcepub fn underline_thickness(&self) -> FWord
pub fn underline_thickness(&self) -> FWord
Suggested values for the underline thickness. In general, the underline thickness should match the thickness of the underscore character (U+005F LOW LINE), and should also match the strikeout thickness, which is specified in the OS/2 table.
Sourcepub fn is_fixed_pitch(&self) -> u32
pub fn is_fixed_pitch(&self) -> u32
Set to 0 if the font is proportionally spaced, non-zero if the font is not proportionally spaced (i.e. monospaced).
Sourcepub fn min_mem_type42(&self) -> u32
pub fn min_mem_type42(&self) -> u32
Minimum memory usage when an OpenType font is downloaded.
Sourcepub fn max_mem_type42(&self) -> u32
pub fn max_mem_type42(&self) -> u32
Maximum memory usage when an OpenType font is downloaded.
Sourcepub fn min_mem_type1(&self) -> u32
pub fn min_mem_type1(&self) -> u32
Minimum memory usage when an OpenType font is downloaded as a Type 1 font.
Sourcepub fn max_mem_type1(&self) -> u32
pub fn max_mem_type1(&self) -> u32
Maximum memory usage when an OpenType font is downloaded as a Type 1 font.
Sourcepub fn num_glyphs(&self) -> Option<u16>
pub fn num_glyphs(&self) -> Option<u16>
Number of glyphs (this should be the same as numGlyphs in ‘maxp’ table).
Sourcepub fn glyph_name_index(&self) -> Option<&'a [BigEndian<u16>]>
pub fn glyph_name_index(&self) -> Option<&'a [BigEndian<u16>]>
Array of indices into the string data. See below for details.
Sourcepub fn string_data(&self) -> Option<VarLenArray<'a, PString<'a>>>
pub fn string_data(&self) -> Option<VarLenArray<'a, PString<'a>>>
Storage for the string data.
Source§impl<'a> TableRef<'a, Index1Marker>
impl<'a> TableRef<'a, Index1Marker>
Source§impl<'a> TableRef<'a, Index2Marker>
impl<'a> TableRef<'a, Index2Marker>
Source§impl<'a> TableRef<'a, SbixMarker>
impl<'a> TableRef<'a, SbixMarker>
Sourcepub fn flags(&self) -> HeaderFlags
pub fn flags(&self) -> HeaderFlags
Bit 0: Set to 1. Bit 1: Draw outlines. Bits 2 to 15: reserved (set to 0).
Sourcepub fn num_strikes(&self) -> u32
pub fn num_strikes(&self) -> u32
Number of bitmap strikes.
Sourcepub fn strike_offsets(&self) -> &'a [BigEndian<Offset32>]
pub fn strike_offsets(&self) -> &'a [BigEndian<Offset32>]
Offsets from the beginning of the ‘sbix’ table to data for each individual bitmap strike.
Sourcepub fn strikes(&self) -> ArrayOfOffsets<'a, Strike<'a>, Offset32>
pub fn strikes(&self) -> ArrayOfOffsets<'a, Strike<'a>, Offset32>
A dynamically resolving wrapper for strike_offsets
.
Source§impl<'a> TableRef<'a, StrikeMarker>
impl<'a> TableRef<'a, StrikeMarker>
Source§impl<'a> TableRef<'a, GlyphDataMarker>
impl<'a> TableRef<'a, GlyphDataMarker>
Sourcepub fn origin_offset_x(&self) -> i16
pub fn origin_offset_x(&self) -> i16
The horizontal (x-axis) position of the left edge of the bitmap graphic in relation to the glyph design space origin.
Sourcepub fn origin_offset_y(&self) -> i16
pub fn origin_offset_y(&self) -> i16
The vertical (y-axis) position of the bottom edge of the bitmap graphic in relation to the glyph design space origin.
Sourcepub fn graphic_type(&self) -> Tag
pub fn graphic_type(&self) -> Tag
Indicates the format of the embedded graphic data: one of ’jpg ’, ’png ’ or ‘tiff’, or the special format ‘dupe’.
Source§impl<'a> TableRef<'a, StatMarker>
impl<'a> TableRef<'a, StatMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major/minor version number. Set to 1.2 for new fonts.
Sourcepub fn design_axis_size(&self) -> u16
pub fn design_axis_size(&self) -> u16
The size in bytes of each axis record.
Sourcepub fn design_axis_count(&self) -> u16
pub fn design_axis_count(&self) -> u16
The number of axis records. In a font with an ‘fvar’ table, this value must be greater than or equal to the axisCount value in the ‘fvar’ table. In all fonts, must be greater than zero if axisValueCount is greater than zero.
Sourcepub fn design_axes_offset(&self) -> Offset32
pub fn design_axes_offset(&self) -> Offset32
Offset in bytes from the beginning of the STAT table to the start of the design axes array. If designAxisCount is zero, set to zero; if designAxisCount is greater than zero, must be greater than zero.
Sourcepub fn design_axes(&self) -> Result<&'a [AxisRecord], ReadError>
pub fn design_axes(&self) -> Result<&'a [AxisRecord], ReadError>
Attempt to resolve design_axes_offset
.
Sourcepub fn axis_value_count(&self) -> u16
pub fn axis_value_count(&self) -> u16
The number of axis value tables.
Sourcepub fn offset_to_axis_value_offsets(&self) -> Nullable<Offset32>
pub fn offset_to_axis_value_offsets(&self) -> Nullable<Offset32>
Offset in bytes from the beginning of the STAT table to the start of the design axes value offsets array. If axisValueCount is zero, set to zero; if axisValueCount is greater than zero, must be greater than zero.
Sourcepub fn offset_to_axis_values(
&self,
) -> Option<Result<AxisValueArray<'a>, ReadError>>
pub fn offset_to_axis_values( &self, ) -> Option<Result<AxisValueArray<'a>, ReadError>>
Attempt to resolve offset_to_axis_value_offsets
.
Sourcepub fn elided_fallback_name_id(&self) -> Option<NameId>
pub fn elided_fallback_name_id(&self) -> Option<NameId>
Name ID used as fallback when projection of names into a particular font model produces a subfamily name containing only elidable elements.
Source§impl<'a> TableRef<'a, AxisValueArrayMarker>
impl<'a> TableRef<'a, AxisValueArrayMarker>
Sourcepub fn axis_value_offsets(&self) -> &'a [BigEndian<Offset16>]
pub fn axis_value_offsets(&self) -> &'a [BigEndian<Offset16>]
Array of offsets to axis value tables, in bytes from the start of the axis value offsets array.
Sourcepub fn axis_values(&self) -> ArrayOfOffsets<'a, AxisValue<'a>, Offset16>
pub fn axis_values(&self) -> ArrayOfOffsets<'a, AxisValue<'a>, Offset16>
A dynamically resolving wrapper for axis_value_offsets
.
Source§impl<'a> TableRef<'a, AxisValueFormat1Marker>
impl<'a> TableRef<'a, AxisValueFormat1Marker>
Sourcepub fn axis_index(&self) -> u16
pub fn axis_index(&self) -> u16
Zero-base index into the axis record array identifying the axis of design variation to which the axis value table applies. Must be less than designAxisCount.
Sourcepub fn flags(&self) -> AxisValueTableFlags
pub fn flags(&self) -> AxisValueTableFlags
Flags — see below for details.
Sourcepub fn value_name_id(&self) -> NameId
pub fn value_name_id(&self) -> NameId
The name ID for entries in the ‘name’ table that provide a display string for this attribute value.
Source§impl<'a> TableRef<'a, AxisValueFormat2Marker>
impl<'a> TableRef<'a, AxisValueFormat2Marker>
Sourcepub fn axis_index(&self) -> u16
pub fn axis_index(&self) -> u16
Zero-base index into the axis record array identifying the axis of design variation to which the axis value table applies. Must be less than designAxisCount.
Sourcepub fn flags(&self) -> AxisValueTableFlags
pub fn flags(&self) -> AxisValueTableFlags
Flags — see below for details.
Sourcepub fn value_name_id(&self) -> NameId
pub fn value_name_id(&self) -> NameId
The name ID for entries in the ‘name’ table that provide a display string for this attribute value.
Sourcepub fn nominal_value(&self) -> Fixed
pub fn nominal_value(&self) -> Fixed
A nominal numeric value for this attribute value.
Sourcepub fn range_min_value(&self) -> Fixed
pub fn range_min_value(&self) -> Fixed
The minimum value for a range associated with the specified name ID.
Sourcepub fn range_max_value(&self) -> Fixed
pub fn range_max_value(&self) -> Fixed
The maximum value for a range associated with the specified name ID.
Source§impl<'a> TableRef<'a, AxisValueFormat3Marker>
impl<'a> TableRef<'a, AxisValueFormat3Marker>
Sourcepub fn axis_index(&self) -> u16
pub fn axis_index(&self) -> u16
Zero-base index into the axis record array identifying the axis of design variation to which the axis value table applies. Must be less than designAxisCount.
Sourcepub fn flags(&self) -> AxisValueTableFlags
pub fn flags(&self) -> AxisValueTableFlags
Flags — see below for details.
Sourcepub fn value_name_id(&self) -> NameId
pub fn value_name_id(&self) -> NameId
The name ID for entries in the ‘name’ table that provide a display string for this attribute value.
Sourcepub fn linked_value(&self) -> Fixed
pub fn linked_value(&self) -> Fixed
The numeric value for a style-linked mapping from this value.
Source§impl<'a> TableRef<'a, AxisValueFormat4Marker>
impl<'a> TableRef<'a, AxisValueFormat4Marker>
Sourcepub fn axis_count(&self) -> u16
pub fn axis_count(&self) -> u16
The total number of axes contributing to this axis-values combination.
Sourcepub fn flags(&self) -> AxisValueTableFlags
pub fn flags(&self) -> AxisValueTableFlags
Flags — see below for details.
Sourcepub fn value_name_id(&self) -> NameId
pub fn value_name_id(&self) -> NameId
The name ID for entries in the ‘name’ table that provide a display string for this combination of axis values.
Sourcepub fn axis_values(&self) -> &'a [AxisValueRecord]
pub fn axis_values(&self) -> &'a [AxisValueRecord]
Array of AxisValue records that provide the combination of axis values, one for each contributing axis.
Source§impl<'a> TableRef<'a, SvgMarker>
impl<'a> TableRef<'a, SvgMarker>
Sourcepub fn svg_document_list_offset(&self) -> Offset32
pub fn svg_document_list_offset(&self) -> Offset32
Offset to the SVGDocumentList, from the start of the SVG table. Must be non-zero.
Sourcepub fn svg_document_list(&self) -> Result<SVGDocumentList<'a>, ReadError>
pub fn svg_document_list(&self) -> Result<SVGDocumentList<'a>, ReadError>
Attempt to resolve svg_document_list_offset
.
Source§impl<'a> TableRef<'a, SVGDocumentListMarker>
impl<'a> TableRef<'a, SVGDocumentListMarker>
Sourcepub fn num_entries(&self) -> u16
pub fn num_entries(&self) -> u16
Number of SVGDocumentRecords. Must be non-zero.
Sourcepub fn document_records(&self) -> &'a [SVGDocumentRecord]
pub fn document_records(&self) -> &'a [SVGDocumentRecord]
Array of SVGDocumentRecords.
Source§impl<'a> TableRef<'a, VarcMarker>
impl<'a> TableRef<'a, VarcMarker>
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
.
Source§impl<'a> TableRef<'a, MultiItemVariationStoreMarker>
impl<'a> TableRef<'a, MultiItemVariationStoreMarker>
pub fn format(&self) -> u16
pub fn region_list_offset(&self) -> Offset32
Sourcepub fn region_list(&self) -> Result<SparseVariationRegionList<'a>, ReadError>
pub fn region_list(&self) -> Result<SparseVariationRegionList<'a>, ReadError>
Attempt to resolve region_list_offset
.
pub fn variation_data_count(&self) -> u16
pub fn variation_data_offsets(&self) -> &'a [BigEndian<Offset32>]
Sourcepub fn variation_data(
&self,
) -> ArrayOfOffsets<'a, MultiItemVariationData<'a>, Offset32>
pub fn variation_data( &self, ) -> ArrayOfOffsets<'a, MultiItemVariationData<'a>, Offset32>
A dynamically resolving wrapper for variation_data_offsets
.
Source§impl<'a> TableRef<'a, SparseVariationRegionListMarker>
impl<'a> TableRef<'a, SparseVariationRegionListMarker>
pub fn region_count(&self) -> u16
pub fn region_offsets(&self) -> &'a [BigEndian<Offset32>]
Sourcepub fn regions(&self) -> ArrayOfOffsets<'a, SparseVariationRegion<'a>, Offset32>
pub fn regions(&self) -> ArrayOfOffsets<'a, SparseVariationRegion<'a>, Offset32>
A dynamically resolving wrapper for region_offsets
.
Source§impl<'a> TableRef<'a, SparseVariationRegionMarker>
impl<'a> TableRef<'a, SparseVariationRegionMarker>
pub fn region_axis_count(&self) -> u16
pub fn region_axis_offsets(&self) -> &'a [SparseRegionAxisCoordinates]
Source§impl<'a> TableRef<'a, MultiItemVariationDataMarker>
impl<'a> TableRef<'a, MultiItemVariationDataMarker>
pub fn format(&self) -> u8
pub fn region_index_count(&self) -> u16
pub fn region_indices(&self) -> &'a [BigEndian<u16>]
pub fn raw_delta_sets(&self) -> &'a [u8] ⓘ
Source§impl<'a> TableRef<'a, ConditionListMarker>
impl<'a> TableRef<'a, ConditionListMarker>
pub fn condition_count(&self) -> u32
pub fn condition_offsets(&self) -> &'a [BigEndian<Offset32>]
Sourcepub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset32>
pub fn conditions(&self) -> ArrayOfOffsets<'a, Condition<'a>, Offset32>
A dynamically resolving wrapper for condition_offsets
.
Source§impl TableRef<'_, VarcMarker>
impl TableRef<'_, VarcMarker>
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
Source§impl<'a> TableRef<'a, MultiItemVariationDataMarker>
impl<'a> TableRef<'a, MultiItemVariationDataMarker>
Sourcepub fn delta_sets(&self) -> Result<Index2<'a>, ReadError>
pub fn delta_sets(&self) -> Result<Index2<'a>, ReadError>
An Index2 where each item is a PackedDeltas
Sourcepub fn delta_set(&self, i: usize) -> Result<PackedDeltas<'a>, ReadError>
pub fn delta_set(&self, i: usize) -> Result<PackedDeltas<'a>, ReadError>
Read a specific delta set.
Equivalent to calling Self::delta_sets, fetching item i, and parsing as PackedDeltas
Source§impl<'a> TableRef<'a, TupleVariationHeaderMarker>
impl<'a> TableRef<'a, TupleVariationHeaderMarker>
Sourcepub fn variation_data_size(&self) -> u16
pub fn variation_data_size(&self) -> u16
The size in bytes of the serialized data for this tuple variation table.
Sourcepub fn tuple_index(&self) -> TupleIndex
pub fn tuple_index(&self) -> TupleIndex
A packed field. The high 4 bits are flags (see below). The low 12 bits are an index into a shared tuple records array.
Source§impl<'a> TableRef<'a, DeltaSetIndexMapFormat0Marker>
impl<'a> TableRef<'a, DeltaSetIndexMapFormat0Marker>
Sourcepub fn entry_format(&self) -> EntryFormat
pub fn entry_format(&self) -> EntryFormat
A packed field that describes the compressed representation of delta-set indices. See details below.
Source§impl<'a> TableRef<'a, DeltaSetIndexMapFormat1Marker>
impl<'a> TableRef<'a, DeltaSetIndexMapFormat1Marker>
Sourcepub fn entry_format(&self) -> EntryFormat
pub fn entry_format(&self) -> EntryFormat
A packed field that describes the compressed representation of delta-set indices. See details below.
Source§impl<'a> TableRef<'a, VariationRegionListMarker>
impl<'a> TableRef<'a, VariationRegionListMarker>
Sourcepub fn axis_count(&self) -> u16
pub fn axis_count(&self) -> u16
The number of variation axes for this font. This must be the same number as axisCount in the ‘fvar’ table.
Sourcepub fn region_count(&self) -> u16
pub fn region_count(&self) -> u16
The number of variation region tables in the variation region list. Must be less than 32,768.
Sourcepub fn variation_regions(&self) -> ComputedArray<'a, VariationRegion<'a>>
pub fn variation_regions(&self) -> ComputedArray<'a, VariationRegion<'a>>
Array of variation regions.
Source§impl<'a> TableRef<'a, ItemVariationStoreMarker>
impl<'a> TableRef<'a, ItemVariationStoreMarker>
Sourcepub fn variation_region_list_offset(&self) -> Offset32
pub fn variation_region_list_offset(&self) -> Offset32
Offset in bytes from the start of the item variation store to the variation region list.
Sourcepub fn variation_region_list(
&self,
) -> Result<VariationRegionList<'a>, ReadError>
pub fn variation_region_list( &self, ) -> Result<VariationRegionList<'a>, ReadError>
Attempt to resolve variation_region_list_offset
.
Sourcepub fn item_variation_data_count(&self) -> u16
pub fn item_variation_data_count(&self) -> u16
The number of item variation data subtables.
Sourcepub fn item_variation_data_offsets(&self) -> &'a [BigEndian<Nullable<Offset32>>]
pub fn item_variation_data_offsets(&self) -> &'a [BigEndian<Nullable<Offset32>>]
Offsets in bytes from the start of the item variation store to each item variation data subtable.
Sourcepub fn item_variation_data(
&self,
) -> ArrayOfNullableOffsets<'a, ItemVariationData<'a>, Offset32>
pub fn item_variation_data( &self, ) -> ArrayOfNullableOffsets<'a, ItemVariationData<'a>, Offset32>
A dynamically resolving wrapper for item_variation_data_offsets
.
Source§impl<'a> TableRef<'a, ItemVariationDataMarker>
impl<'a> TableRef<'a, ItemVariationDataMarker>
Sourcepub fn item_count(&self) -> u16
pub fn item_count(&self) -> u16
The number of delta sets for distinct items.
Sourcepub fn word_delta_count(&self) -> u16
pub fn word_delta_count(&self) -> u16
A packed field: the high bit is a flag—see details below.
Sourcepub fn region_index_count(&self) -> u16
pub fn region_index_count(&self) -> u16
The number of variation regions referenced.
Sourcepub fn region_indexes(&self) -> &'a [BigEndian<u16>]
pub fn region_indexes(&self) -> &'a [BigEndian<u16>]
Array of indices into the variation region list for the regions referenced by this item variation data table.
Sourcepub fn delta_sets(&self) -> &'a [u8] ⓘ
pub fn delta_sets(&self) -> &'a [u8] ⓘ
Delta-set rows.
Source§impl<'a> TableRef<'a, TupleVariationHeaderMarker>
impl<'a> TableRef<'a, TupleVariationHeaderMarker>
Sourcepub fn peak_tuple(&self) -> Option<Tuple<'a>>
pub fn peak_tuple(&self) -> Option<Tuple<'a>>
Peak tuple record for this tuple variation table — optional, determined by flags in the tupleIndex value. Note that this must always be included in the ‘cvar’ table.
Sourcepub fn intermediate_start_tuple(&self) -> Option<Tuple<'a>>
pub fn intermediate_start_tuple(&self) -> Option<Tuple<'a>>
Intermediate start tuple record for this tuple variation table — optional, determined by flags in the tupleIndex value.
Sourcepub fn intermediate_end_tuple(&self) -> Option<Tuple<'a>>
pub fn intermediate_end_tuple(&self) -> Option<Tuple<'a>>
Intermediate end tuple record for this tuple variation table — optional, determined by flags in the tupleIndex value.
Source§impl TableRef<'_, ItemVariationStoreMarker>
impl TableRef<'_, ItemVariationStoreMarker>
Sourcepub fn compute_delta(
&self,
index: DeltaSetIndex,
coords: &[F2Dot14],
) -> Result<i32, ReadError>
pub fn compute_delta( &self, index: DeltaSetIndex, coords: &[F2Dot14], ) -> Result<i32, ReadError>
Computes the delta value for the specified index and set of normalized variation coordinates.
Sourcepub fn compute_float_delta(
&self,
index: DeltaSetIndex,
coords: &[F2Dot14],
) -> Result<FloatItemDelta, ReadError>
pub fn compute_float_delta( &self, index: DeltaSetIndex, coords: &[F2Dot14], ) -> Result<FloatItemDelta, ReadError>
Computes the delta value in floating point for the specified index and set of normalized variation coordinates.
Source§impl<'a> TableRef<'a, VheaMarker>
impl<'a> TableRef<'a, VheaMarker>
Sourcepub fn version(&self) -> Version16Dot16
pub fn version(&self) -> Version16Dot16
The major/minor version (1, 1)
Sourcepub fn line_gap(&self) -> FWord
pub fn line_gap(&self) -> FWord
Typographic line gap. Negative LineGap values are treated as zero in some legacy platform implementations.
Sourcepub fn advance_height_max(&self) -> UfWord
pub fn advance_height_max(&self) -> UfWord
Maximum advance height value in ‘vmtx’ table.
Sourcepub fn min_top_side_bearing(&self) -> FWord
pub fn min_top_side_bearing(&self) -> FWord
Minimum top sidebearing value in ‘vmtx’ table for glyphs with contours (empty glyphs should be ignored).
Sourcepub fn min_bottom_side_bearing(&self) -> FWord
pub fn min_bottom_side_bearing(&self) -> FWord
Minimum bottom sidebearing value
Sourcepub fn y_max_extent(&self) -> FWord
pub fn y_max_extent(&self) -> FWord
Defined as max( tsb + (yMax-yMin)).
Sourcepub fn caret_slope_rise(&self) -> i16
pub fn caret_slope_rise(&self) -> i16
Used to calculate the slope of the cursor (rise/run); 1 for vertical caret, 0 for horizontal.
Sourcepub fn caret_slope_run(&self) -> i16
pub fn caret_slope_run(&self) -> i16
0 for vertical caret, 1 for horizontal.
Sourcepub fn caret_offset(&self) -> i16
pub fn caret_offset(&self) -> i16
The amount by which a slanted highlight on a glyph needs to be shifted to produce the best appearance. Set to 0 for non-slanted fonts
Sourcepub fn metric_data_format(&self) -> i16
pub fn metric_data_format(&self) -> i16
0 for current format.
Sourcepub fn number_of_long_ver_metrics(&self) -> u16
pub fn number_of_long_ver_metrics(&self) -> u16
Number of LongMetric entries in ‘hmtx’/‘vmtx’ table
Source§impl<'a> TableRef<'a, VmtxMarker>
impl<'a> TableRef<'a, VmtxMarker>
Sourcepub fn v_metrics(&self) -> &'a [LongMetric]
pub fn v_metrics(&self) -> &'a [LongMetric]
Paired advance height and top side bearing values for each glyph. Records are indexed by glyph ID.
Sourcepub fn top_side_bearings(&self) -> &'a [BigEndian<i16>]
pub fn top_side_bearings(&self) -> &'a [BigEndian<i16>]
Top side bearings for glyph IDs greater than or equal to numberOfLongMetrics.
Source§impl<'a> TableRef<'a, VorgMarker>
impl<'a> TableRef<'a, VorgMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major/minor version number. Set to 1.0.
Sourcepub fn default_vert_origin_y(&self) -> i16
pub fn default_vert_origin_y(&self) -> i16
The y coordinate of a glyph’s vertical origin, in the font’s design coordinate system, to be used if no entry is present for the glyph in the vertOriginYMetrics array.
Sourcepub fn num_vert_origin_y_metrics(&self) -> u16
pub fn num_vert_origin_y_metrics(&self) -> u16
Number of elements in the vertOriginYMetrics array.
Sourcepub fn vert_origin_y_metrics(&self) -> &'a [VertOriginYMetrics]
pub fn vert_origin_y_metrics(&self) -> &'a [VertOriginYMetrics]
Array of VertOriginYMetrics records, sorted by glyph ID.
Source§impl TableRef<'_, VorgMarker>
impl TableRef<'_, VorgMarker>
Sourcepub fn vertical_origin_y(&self, glyph_id: GlyphId) -> i16
pub fn vertical_origin_y(&self, glyph_id: GlyphId) -> i16
Returns the y coordinate of the of the glyph’s vertical origin.
Source§impl<'a> TableRef<'a, VvarMarker>
impl<'a> TableRef<'a, VvarMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major version number of the horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.
Sourcepub fn item_variation_store_offset(&self) -> Offset32
pub fn item_variation_store_offset(&self) -> Offset32
Offset in bytes from the start of this table to the item variation store table.
Sourcepub fn item_variation_store(&self) -> Result<ItemVariationStore<'a>, ReadError>
pub fn item_variation_store(&self) -> Result<ItemVariationStore<'a>, ReadError>
Attempt to resolve item_variation_store_offset
.
Sourcepub fn advance_height_mapping_offset(&self) -> Nullable<Offset32>
pub fn advance_height_mapping_offset(&self) -> Nullable<Offset32>
Offset in bytes from the start of this table to the delta-set index mapping for advance heights (may be NULL).
Sourcepub fn advance_height_mapping(
&self,
) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn advance_height_mapping( &self, ) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve advance_height_mapping_offset
.
Sourcepub fn tsb_mapping_offset(&self) -> Nullable<Offset32>
pub fn tsb_mapping_offset(&self) -> Nullable<Offset32>
Offset in bytes from the start of this table to the delta-set index mapping for top side bearings (may be NULL).
Sourcepub fn tsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn tsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve tsb_mapping_offset
.
Sourcepub fn bsb_mapping_offset(&self) -> Nullable<Offset32>
pub fn bsb_mapping_offset(&self) -> Nullable<Offset32>
Offset in bytes from the start of this table to the delta-set index mapping for bottom side bearings (may be NULL).
Sourcepub fn bsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn bsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve bsb_mapping_offset
.
Sourcepub fn v_org_mapping_offset(&self) -> Nullable<Offset32>
pub fn v_org_mapping_offset(&self) -> Nullable<Offset32>
Offset in bytes from the start of this table to the delta-set index mapping for Y coordinates of vertical origins (may be NULL).
Sourcepub fn v_org_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
pub fn v_org_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>
Attempt to resolve v_org_mapping_offset
.
Source§impl TableRef<'_, VvarMarker>
impl TableRef<'_, VvarMarker>
Sourcepub fn advance_height_delta(
&self,
glyph_id: GlyphId,
coords: &[F2Dot14],
) -> Result<Fixed, ReadError>
pub fn advance_height_delta( &self, glyph_id: GlyphId, coords: &[F2Dot14], ) -> Result<Fixed, ReadError>
Returns the advance height delta for the specified glyph identifier and normalized variation coordinates.
Sourcepub fn tsb_delta(
&self,
glyph_id: GlyphId,
coords: &[F2Dot14],
) -> Result<Fixed, ReadError>
pub fn tsb_delta( &self, glyph_id: GlyphId, coords: &[F2Dot14], ) -> Result<Fixed, ReadError>
Returns the top side bearing delta for the specified glyph identifier and normalized variation coordinates.
Source§impl<'a> TableRef<'a, TableDirectoryMarker>
impl<'a> TableRef<'a, TableDirectoryMarker>
Sourcepub fn sfnt_version(&self) -> u32
pub fn sfnt_version(&self) -> u32
0x00010000 or 0x4F54544F
Sourcepub fn num_tables(&self) -> u16
pub fn num_tables(&self) -> u16
Number of tables.
pub fn search_range(&self) -> u16
pub fn entry_selector(&self) -> u16
pub fn range_shift(&self) -> u16
Sourcepub fn table_records(&self) -> &'a [TableRecord]
pub fn table_records(&self) -> &'a [TableRecord]
Table records array—one for each top-level table in the font
Source§impl<'a> TableRef<'a, TTCHeaderMarker>
impl<'a> TableRef<'a, TTCHeaderMarker>
Sourcepub fn version(&self) -> MajorMinor
pub fn version(&self) -> MajorMinor
Major/minor version of the TTC Header
Sourcepub fn table_directory_offsets(&self) -> &'a [BigEndian<u32>]
pub fn table_directory_offsets(&self) -> &'a [BigEndian<u32>]
Array of offsets to the TableDirectory for each font from the beginning of the file
Sourcepub fn dsig_tag(&self) -> Option<u32>
pub fn dsig_tag(&self) -> Option<u32>
Tag indicating that a DSIG table exists, 0x44534947 (‘DSIG’) (null if no signature)
Sourcepub fn dsig_length(&self) -> Option<u32>
pub fn dsig_length(&self) -> Option<u32>
The length (in bytes) of the DSIG table (null if no signature)
Sourcepub fn dsig_offset(&self) -> Option<u32>
pub fn dsig_offset(&self) -> Option<u32>
The offset (in bytes) of the DSIG table from the beginning of the TTC file (null if no signature)