Struct read_fonts::TableRef
source · 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, 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. 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.
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) -> GlyphId
pub fn first_glyph_index(&self) -> GlyphId
First glyph ID of this range.
sourcepub fn last_glyph_index(&self) -> GlyphId
pub fn last_glyph_index(&self) -> GlyphId
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<GlyphId>]
pub fn glyph_array(&self) -> &'a [BigEndian<GlyphId>]
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<'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.
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<(GlyphId, u16), ReadError>
pub fn v0_layer(&self, index: usize) -> Result<(GlyphId, 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, 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.
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 = (GlyphId, CompositeGlyphFlags)> + 'a + Clone
pub fn component_glyphs_and_flags( &self ) -> impl Iterator<Item = (GlyphId, 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<GlyphId>]
pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]
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<GlyphId>]
pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]
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<GlyphId>]
pub fn alternate_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]
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) -> GlyphId
pub fn ligature_glyph(&self) -> GlyphId
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<GlyphId>]
pub fn component_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]
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<GlyphId>]
pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]
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>
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.
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<'a> TableRef<'a, HvarMarker>
impl<'a> TableRef<'a, 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, 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) -> u16
pub fn mark_filtering_set(&self) -> 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<GlyphId>]
pub fn glyph_array(&self) -> &'a [BigEndian<GlyphId>]
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) -> GlyphId
pub fn start_glyph_id(&self) -> GlyphId
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<GlyphId>]
pub fn input_sequence(&self) -> &'a [BigEndian<GlyphId>]
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<GlyphId>]
pub fn backtrack_sequence(&self) -> &'a [BigEndian<GlyphId>]
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<GlyphId>]
pub fn input_sequence(&self) -> &'a [BigEndian<GlyphId>]
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<GlyphId>]
pub fn lookahead_sequence(&self) -> &'a [BigEndian<GlyphId>]
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, ConditionFormat1<'a>, Offset32>
pub fn conditions(&self) -> ArrayOfOffsets<'a, ConditionFormat1<'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, 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, 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, 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, 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<'a> TableRef<'a, ItemVariationStoreMarker>
impl<'a> TableRef<'a, 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, 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<'a> TableRef<'a, VvarMarker>
impl<'a> TableRef<'a, 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)