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>

source

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.

source

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>

source

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.

source

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.

source

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>

source

pub fn version(&self) -> MajorMinor

(major, minor) Version for the BASE table (1,0) or (1,1)

source

pub fn horiz_axis_offset(&self) -> Nullable<Offset16>

Offset to horizontal Axis table, from beginning of BASE table (may be NULL)

source

pub fn horiz_axis(&self) -> Option<Result<Axis<'a>, ReadError>>

Attempt to resolve horiz_axis_offset.

source

pub fn vert_axis_offset(&self) -> Nullable<Offset16>

Offset to vertical Axis table, from beginning of BASE table (may be NULL)

source

pub fn vert_axis(&self) -> Option<Result<Axis<'a>, ReadError>>

Attempt to resolve vert_axis_offset.

source

pub fn item_var_store_offset(&self) -> Option<Nullable<Offset32>>

Offset to Item Variation Store table, from beginning of BASE table (may be null)

source

pub fn item_var_store( &self ) -> Option<Result<ItemVariationStore<'a>, ReadError>>

Attempt to resolve item_var_store_offset.

source§

impl<'a> TableRef<'a, AxisMarker>

source

pub fn base_tag_list_offset(&self) -> Nullable<Offset16>

Offset to BaseTagList table, from beginning of Axis table (may be NULL)

source

pub fn base_tag_list(&self) -> Option<Result<BaseTagList<'a>, ReadError>>

Attempt to resolve base_tag_list_offset.

source

pub fn base_script_list_offset(&self) -> Offset16

Offset to BaseScriptList table, from beginning of Axis table

source

pub fn base_script_list(&self) -> Result<BaseScriptList<'a>, ReadError>

Attempt to resolve base_script_list_offset.

source§

impl<'a> TableRef<'a, BaseTagListMarker>

source

pub fn base_tag_count(&self) -> u16

Number of baseline identification tags in this text direction — may be zero (0)

source

pub fn baseline_tags(&self) -> &'a [BigEndian<Tag>]

Array of 4-byte baseline identification tags — must be in alphabetical order

source§

impl<'a> TableRef<'a, BaseScriptListMarker>

source

pub fn base_script_count(&self) -> u16

Number of BaseScriptRecords defined

source

pub fn base_script_records(&self) -> &'a [BaseScriptRecord]

Array of BaseScriptRecords, in alphabetical order by baseScriptTag

source§

impl<'a> TableRef<'a, BaseScriptMarker>

source

pub fn base_values_offset(&self) -> Nullable<Offset16>

Offset to BaseValues table, from beginning of BaseScript table (may be NULL)

source

pub fn base_values(&self) -> Option<Result<BaseValues<'a>, ReadError>>

Attempt to resolve base_values_offset.

source

pub fn default_min_max_offset(&self) -> Nullable<Offset16>

Offset to MinMax table, from beginning of BaseScript table (may be NULL)

source

pub fn default_min_max(&self) -> Option<Result<MinMax<'a>, ReadError>>

Attempt to resolve default_min_max_offset.

source

pub fn base_lang_sys_count(&self) -> u16

Number of BaseLangSysRecords defined — may be zero (0)

source

pub fn base_lang_sys_records(&self) -> &'a [BaseLangSysRecord]

Array of BaseLangSysRecords, in alphabetical order by BaseLangSysTag

source§

impl<'a> TableRef<'a, BaseValuesMarker>

source

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

source

pub fn base_coord_count(&self) -> u16

Number of BaseCoord tables defined — should equal baseTagCount in the BaseTagList

source

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

source

pub fn base_coords(&self) -> ArrayOfOffsets<'a, BaseCoord<'a>, Offset16>

A dynamically resolving wrapper for base_coord_offsets.

source§

impl<'a> TableRef<'a, MinMaxMarker>

source

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)

source

pub fn min_coord(&self) -> Option<Result<BaseCoord<'a>, ReadError>>

Attempt to resolve min_coord_offset.

source

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)

source

pub fn max_coord(&self) -> Option<Result<BaseCoord<'a>, ReadError>>

Attempt to resolve max_coord_offset.

source

pub fn feat_min_max_count(&self) -> u16

Number of FeatMinMaxRecords — may be zero (0)

source

pub fn feat_min_max_records(&self) -> &'a [FeatMinMaxRecord]

Array of FeatMinMaxRecords, in alphabetical order by featureTableTag

source§

impl<'a> TableRef<'a, BaseCoordFormat1Marker>

source

pub fn base_coord_format(&self) -> u16

Format identifier — format = 1

source

pub fn coordinate(&self) -> i16

X or Y value, in design units

source§

impl<'a> TableRef<'a, BaseCoordFormat2Marker>

source

pub fn base_coord_format(&self) -> u16

Format identifier — format = 2

source

pub fn coordinate(&self) -> i16

X or Y value, in design units

source

pub fn reference_glyph(&self) -> u16

Glyph ID of control glyph

source

pub fn base_coord_point(&self) -> u16

Index of contour point on the reference glyph

source§

impl<'a> TableRef<'a, BaseCoordFormat3Marker>

source

pub fn base_coord_format(&self) -> u16

Format identifier — format = 3

source

pub fn coordinate(&self) -> i16

X or Y value, in design units

source

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).

source

pub fn device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>

Attempt to resolve device_offset.

source§

impl<'a> TableRef<'a, IndexSubtableArrayMarker>

source

pub fn first_glyph_index(&self) -> GlyphId

First glyph ID of this range.

source

pub fn last_glyph_index(&self) -> GlyphId

Last glyph ID of this range (inclusive).

source

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>

source

pub fn index_format(&self) -> u16

Format of this IndexSubTable.

source

pub fn image_format(&self) -> u16

Format of EBDT image data.

source

pub fn image_data_offset(&self) -> u32

Offset to image data in EBDT table.

source

pub fn sbit_offsets(&self) -> &'a [BigEndian<u32>]

source§

impl<'a> TableRef<'a, IndexSubtable2Marker>

source

pub fn index_format(&self) -> u16

Format of this IndexSubTable.

source

pub fn image_format(&self) -> u16

Format of EBDT image data.

source

pub fn image_data_offset(&self) -> u32

Offset to image data in EBDT table.

source

pub fn image_size(&self) -> u32

All the glyphs are of the same size.

source

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>

source

pub fn index_format(&self) -> u16

Format of this IndexSubTable.

source

pub fn image_format(&self) -> u16

Format of EBDT image data.

source

pub fn image_data_offset(&self) -> u32

Offset to image data in EBDT table.

source

pub fn sbit_offsets(&self) -> &'a [BigEndian<u16>]

source§

impl<'a> TableRef<'a, IndexSubtable4Marker>

source

pub fn index_format(&self) -> u16

Format of this IndexSubTable.

source

pub fn image_format(&self) -> u16

Format of EBDT image data.

source

pub fn image_data_offset(&self) -> u32

Offset to image data in EBDT table.

source

pub fn num_glyphs(&self) -> u32

Array length.

source

pub fn glyph_array(&self) -> &'a [GlyphIdOffsetPair]

One per glyph.

source§

impl<'a> TableRef<'a, IndexSubtable5Marker>

source

pub fn index_format(&self) -> u16

Format of this IndexSubTable.

source

pub fn image_format(&self) -> u16

Format of EBDT image data.

source

pub fn image_data_offset(&self) -> u32

Offset to image data in EBDT table.

source

pub fn image_size(&self) -> u32

All glyphs have the same data size.

source

pub fn big_metrics(&self) -> &'a [BigGlyphMetrics]

All glyphs have the same metrics.

source

pub fn num_glyphs(&self) -> u32

Array length.

source

pub fn glyph_array(&self) -> &'a [BigEndian<GlyphId>]

One per glyph, sorted by glyhph ID.

source§

impl<'a> TableRef<'a, CbdtMarker>

source

pub fn major_version(&self) -> u16

Major version of the CBDT table, = 3.

source

pub fn minor_version(&self) -> u16

Minor version of CBDT table, = 0.

source§

impl<'a> TableRef<'a, CbdtMarker>

source

pub fn data( &self, location: &BitmapLocation ) -> Result<BitmapData<'a>, ReadError>

source§

impl<'a> TableRef<'a, CblcMarker>

source

pub fn major_version(&self) -> u16

Major version of the CBLC table, = 3.

source

pub fn minor_version(&self) -> u16

Minor version of CBLC table, = 0.

source

pub fn num_sizes(&self) -> u32

Number of BitmapSize records.

source

pub fn bitmap_sizes(&self) -> &'a [BitmapSize]

BitmapSize records array.

source§

impl<'a> TableRef<'a, CffHeaderMarker>

source

pub fn major(&self) -> u8

Format major version (starting at 1).

source

pub fn minor(&self) -> u8

Format minor version (starting at 0).

source

pub fn hdr_size(&self) -> u8

Header size (bytes).

source

pub fn off_size(&self) -> u8

Absolute offset size.

source

pub fn _padding(&self) -> &'a [u8]

Padding bytes before the start of the Name INDEX.

source

pub fn trailing_data(&self) -> &'a [u8]

Remaining table data.

source§

impl<'a> TableRef<'a, Cff2HeaderMarker>

source

pub fn major_version(&self) -> u8

Format major version (set to 2).

source

pub fn minor_version(&self) -> u8

Format minor version (set to 0).

source

pub fn header_size(&self) -> u8

Header size (bytes).

source

pub fn top_dict_length(&self) -> u16

Length of Top DICT structure in bytes.

source

pub fn _padding(&self) -> &'a [u8]

Padding bytes before the start of the Top DICT.

source

pub fn top_dict_data(&self) -> &'a [u8]

Data containing the Top DICT.

source

pub fn trailing_data(&self) -> &'a [u8]

Remaining table data.

source§

impl<'a> TableRef<'a, CmapMarker>

source

pub fn version(&self) -> u16

Table version number (0).

source

pub fn num_tables(&self) -> u16

Number of encoding tables that follow.

source

pub fn encoding_records(&self) -> &'a [EncodingRecord]

source§

impl<'a> TableRef<'a, Cmap0Marker>

source

pub fn format(&self) -> u16

Format number is set to 0.

source

pub fn length(&self) -> u16

This is the length in bytes of the subtable.

source

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.

source

pub fn glyph_id_array(&self) -> &'a [u8]

An array that maps character codes to glyph index values.

source§

impl<'a> TableRef<'a, Cmap2Marker>

source

pub fn format(&self) -> u16

Format number is set to 2.

source

pub fn length(&self) -> u16

This is the length in bytes of the subtable.

source

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.

source

pub fn sub_header_keys(&self) -> &'a [BigEndian<u16>]

Array that maps high bytes to subHeaders: value is subHeader index × 8.

source§

impl<'a> TableRef<'a, Cmap4Marker>

source

pub fn format(&self) -> u16

Format number is set to 4.

source

pub fn length(&self) -> u16

This is the length in bytes of the subtable.

source

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.

source

pub fn seg_count_x2(&self) -> u16

2 × segCount.

source

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)

source

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)))

source

pub fn range_shift(&self) -> u16

segCount times 2, minus searchRange ((segCount * 2) - searchRange)

source

pub fn end_code(&self) -> &'a [BigEndian<u16>]

End characterCode for each segment, last=0xFFFF.

source

pub fn start_code(&self) -> &'a [BigEndian<u16>]

Start character code for each segment.

source

pub fn id_delta(&self) -> &'a [BigEndian<i16>]

Delta for all character codes in segment.

source

pub fn id_range_offsets(&self) -> &'a [BigEndian<u16>]

Offsets into glyphIdArray or 0

source

pub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]

Glyph index array (arbitrary length)

source§

impl<'a> TableRef<'a, Cmap6Marker>

source

pub fn format(&self) -> u16

Format number is set to 6.

source

pub fn length(&self) -> u16

This is the length in bytes of the subtable.

source

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.

source

pub fn first_code(&self) -> u16

First character code of subrange.

source

pub fn entry_count(&self) -> u16

Number of character codes in subrange.

source

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>

source

pub fn format(&self) -> u16

Subtable format; set to 8.

source

pub fn length(&self) -> u32

Byte length of this subtable (including the header)

source

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.

source

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

source

pub fn num_groups(&self) -> u32

Number of groupings which follow

source

pub fn groups(&self) -> &'a [SequentialMapGroup]

Array of SequentialMapGroup records.

source§

impl<'a> TableRef<'a, Cmap10Marker>

source

pub fn format(&self) -> u16

Subtable format; set to 10.

source

pub fn length(&self) -> u32

Byte length of this subtable (including the header)

source

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.

source

pub fn start_char_code(&self) -> u32

First character code covered

source

pub fn num_chars(&self) -> u32

Number of character codes covered

source

pub fn glyph_id_array(&self) -> &'a [BigEndian<u16>]

Array of glyph indices for the character codes covered

source§

impl<'a> TableRef<'a, Cmap12Marker>

source

pub fn format(&self) -> u16

Subtable format; set to 12.

source

pub fn length(&self) -> u32

Byte length of this subtable (including the header)

source

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.

source

pub fn num_groups(&self) -> u32

Number of groupings which follow

source

pub fn groups(&self) -> &'a [SequentialMapGroup]

Array of SequentialMapGroup records.

source§

impl<'a> TableRef<'a, Cmap13Marker>

source

pub fn format(&self) -> u16

Subtable format; set to 13.

source

pub fn length(&self) -> u32

Byte length of this subtable (including the header)

source

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.

source

pub fn num_groups(&self) -> u32

Number of groupings which follow

source

pub fn groups(&self) -> &'a [ConstantMapGroup]

Array of ConstantMapGroup records.

source§

impl<'a> TableRef<'a, Cmap14Marker>

source

pub fn format(&self) -> u16

Subtable format. Set to 14.

source

pub fn length(&self) -> u32

Byte length of this subtable (including this header)

source

pub fn num_var_selector_records(&self) -> u32

Number of variation Selector Records

source

pub fn var_selector(&self) -> &'a [VariationSelector]

Array of VariationSelector records.

source§

impl<'a> TableRef<'a, DefaultUvsMarker>

source

pub fn num_unicode_value_ranges(&self) -> u32

Number of Unicode character ranges.

source

pub fn ranges(&self) -> &'a [UnicodeRange]

Array of UnicodeRange records.

source§

impl<'a> TableRef<'a, NonDefaultUvsMarker>

source

pub fn num_uvs_mappings(&self) -> u32

source

pub fn uvs_mapping(&self) -> &'a [UvsMapping]

source§

impl<'a> TableRef<'a, CmapMarker>

source

pub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>

Map a codepoint to a nominal glyph identifier

This uses the first available subtable that provides a valid mapping.

§Note:

Mapping logic is currently only implemented for the most common subtable formats.

source§

impl<'a> TableRef<'a, Cmap4Marker>

source

pub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>

Maps a codepoint to a nominal glyph identifier.

source

pub fn iter(&self) -> Cmap4Iter<'a>

Returns an iterator over all (codepoint, glyph identifier) pairs in the subtable.

source§

impl<'a> TableRef<'a, Cmap12Marker>

source

pub fn map_codepoint(&self, codepoint: impl Into<u32>) -> Option<GlyphId>

Maps a codepoint to a nominal glyph identifier.

source

pub fn iter(&self) -> Cmap12Iter<'a>

Returns an iterator over all (codepoint, glyph identifier) pairs in the subtable.

source§

impl<'a> TableRef<'a, Cmap14Marker>

source

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.

source

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>

source

pub fn version(&self) -> u16

Table version number - set to 0 or 1.

source

pub fn num_base_glyph_records(&self) -> u16

Number of BaseGlyph records; may be 0 in a version 1 table.

source

pub fn base_glyph_records_offset(&self) -> Nullable<Offset32>

Offset to baseGlyphRecords array (may be NULL).

source

pub fn base_glyph_records(&self) -> Option<Result<&'a [BaseGlyph], ReadError>>

Attempt to resolve base_glyph_records_offset.

source

pub fn layer_records_offset(&self) -> Nullable<Offset32>

Offset to layerRecords array (may be NULL).

source

pub fn layer_records(&self) -> Option<Result<&'a [Layer], ReadError>>

Attempt to resolve layer_records_offset.

source

pub fn num_layer_records(&self) -> u16

Number of Layer records; may be 0 in a version 1 table.

source

pub fn base_glyph_list_offset(&self) -> Option<Nullable<Offset32>>

Offset to BaseGlyphList table.

source

pub fn base_glyph_list(&self) -> Option<Result<BaseGlyphList<'a>, ReadError>>

Attempt to resolve base_glyph_list_offset.

source

pub fn layer_list_offset(&self) -> Option<Nullable<Offset32>>

Offset to LayerList table (may be NULL).

source

pub fn layer_list(&self) -> Option<Result<LayerList<'a>, ReadError>>

Attempt to resolve layer_list_offset.

source

pub fn clip_list_offset(&self) -> Option<Nullable<Offset32>>

Offset to ClipList table (may be NULL).

source

pub fn clip_list(&self) -> Option<Result<ClipList<'a>, ReadError>>

Attempt to resolve clip_list_offset.

source

pub fn var_index_map_offset(&self) -> Option<Nullable<Offset32>>

Offset to DeltaSetIndexMap table (may be NULL).

source

pub fn var_index_map(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve var_index_map_offset.

source

pub fn item_variation_store_offset(&self) -> Option<Nullable<Offset32>>

Offset to ItemVariationStore (may be NULL).

source

pub fn item_variation_store( &self ) -> Option<Result<ItemVariationStore<'a>, ReadError>>

Attempt to resolve item_variation_store_offset.

source§

impl<'a> TableRef<'a, BaseGlyphListMarker>

source§

impl<'a> TableRef<'a, LayerListMarker>

source

pub fn num_layers(&self) -> u32

source

pub fn paint_offsets(&self) -> &'a [BigEndian<Offset32>]

Offsets to Paint tables.

source

pub fn paints(&self) -> ArrayOfOffsets<'a, Paint<'a>, Offset32>

A dynamically resolving wrapper for paint_offsets.

source§

impl<'a> TableRef<'a, ClipListMarker>

source

pub fn format(&self) -> u8

Set to 1.

source

pub fn num_clips(&self) -> u32

Number of Clip records.

source

pub fn clips(&self) -> &'a [Clip]

Clip records. Sorted by startGlyphID.

source§

impl<'a> TableRef<'a, ClipBoxFormat1Marker>

source

pub fn format(&self) -> u8

Set to 1.

source

pub fn x_min(&self) -> FWord

Minimum x of clip box.

source

pub fn y_min(&self) -> FWord

Minimum y of clip box.

source

pub fn x_max(&self) -> FWord

Maximum x of clip box.

source

pub fn y_max(&self) -> FWord

Maximum y of clip box.

source§

impl<'a> TableRef<'a, ClipBoxFormat2Marker>

source

pub fn format(&self) -> u8

Set to 2.

source

pub fn x_min(&self) -> FWord

Minimum x of clip box. For variation, use varIndexBase + 0.

source

pub fn y_min(&self) -> FWord

Minimum y of clip box. For variation, use varIndexBase + 1.

source

pub fn x_max(&self) -> FWord

Maximum x of clip box. For variation, use varIndexBase + 2.

source

pub fn y_max(&self) -> FWord

Maximum y of clip box. For variation, use varIndexBase + 3.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, ColorLineMarker>

source

pub fn extend(&self) -> Extend

An Extend enum value.

source

pub fn num_stops(&self) -> u16

Number of ColorStop records.

source

pub fn color_stops(&self) -> &'a [ColorStop]

source§

impl<'a> TableRef<'a, VarColorLineMarker>

source

pub fn extend(&self) -> Extend

An Extend enum value.

source

pub fn num_stops(&self) -> u16

Number of ColorStop records.

source

pub fn color_stops(&self) -> &'a [VarColorStop]

Allows for variations.

source§

impl<'a> TableRef<'a, PaintColrLayersMarker>

source

pub fn format(&self) -> u8

Set to 1.

source

pub fn num_layers(&self) -> u8

Number of offsets to paint tables to read from LayerList.

source

pub fn first_layer_index(&self) -> u32

Index (base 0) into the LayerList.

source§

impl<'a> TableRef<'a, PaintSolidMarker>

source

pub fn format(&self) -> u8

Set to 2.

source

pub fn palette_index(&self) -> u16

Index for a CPAL palette entry.

source

pub fn alpha(&self) -> F2Dot14

Alpha value.

source§

impl<'a> TableRef<'a, PaintVarSolidMarker>

source

pub fn format(&self) -> u8

Set to 3.

source

pub fn palette_index(&self) -> u16

Index for a CPAL palette entry.

source

pub fn alpha(&self) -> F2Dot14

Alpha value. For variation, use varIndexBase + 0.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintLinearGradientMarker>

source

pub fn format(&self) -> u8

Set to 4.

source

pub fn color_line_offset(&self) -> Offset24

Offset to ColorLine table.

source

pub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>

Attempt to resolve color_line_offset.

source

pub fn x0(&self) -> FWord

Start point (p₀) x coordinate.

source

pub fn y0(&self) -> FWord

Start point (p₀) y coordinate.

source

pub fn x1(&self) -> FWord

End point (p₁) x coordinate.

source

pub fn y1(&self) -> FWord

End point (p₁) y coordinate.

source

pub fn x2(&self) -> FWord

Rotation point (p₂) x coordinate.

source

pub fn y2(&self) -> FWord

Rotation point (p₂) y coordinate.

source§

impl<'a> TableRef<'a, PaintVarLinearGradientMarker>

source

pub fn format(&self) -> u8

Set to 5.

source

pub fn color_line_offset(&self) -> Offset24

Offset to VarColorLine table.

source

pub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>

Attempt to resolve color_line_offset.

source

pub fn x0(&self) -> FWord

Start point (p₀) x coordinate. For variation, use varIndexBase + 0.

source

pub fn y0(&self) -> FWord

Start point (p₀) y coordinate. For variation, use varIndexBase + 1.

source

pub fn x1(&self) -> FWord

End point (p₁) x coordinate. For variation, use varIndexBase

source

pub fn y1(&self) -> FWord

End point (p₁) y coordinate. For variation, use varIndexBase

source

pub fn x2(&self) -> FWord

Rotation point (p₂) x coordinate. For variation, use varIndexBase + 4.

source

pub fn y2(&self) -> FWord

Rotation point (p₂) y coordinate. For variation, use varIndexBase + 5.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintRadialGradientMarker>

source

pub fn format(&self) -> u8

Set to 6.

source

pub fn color_line_offset(&self) -> Offset24

Offset to ColorLine table.

source

pub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>

Attempt to resolve color_line_offset.

source

pub fn x0(&self) -> FWord

Start circle center x coordinate.

source

pub fn y0(&self) -> FWord

Start circle center y coordinate.

source

pub fn radius0(&self) -> UfWord

Start circle radius.

source

pub fn x1(&self) -> FWord

End circle center x coordinate.

source

pub fn y1(&self) -> FWord

End circle center y coordinate.

source

pub fn radius1(&self) -> UfWord

End circle radius.

source§

impl<'a> TableRef<'a, PaintVarRadialGradientMarker>

source

pub fn format(&self) -> u8

Set to 7.

source

pub fn color_line_offset(&self) -> Offset24

Offset to VarColorLine table.

source

pub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>

Attempt to resolve color_line_offset.

source

pub fn x0(&self) -> FWord

Start circle center x coordinate. For variation, use varIndexBase + 0.

source

pub fn y0(&self) -> FWord

Start circle center y coordinate. For variation, use varIndexBase + 1.

source

pub fn radius0(&self) -> UfWord

Start circle radius. For variation, use varIndexBase + 2.

source

pub fn x1(&self) -> FWord

End circle center x coordinate. For variation, use varIndexBase

source

pub fn y1(&self) -> FWord

End circle center y coordinate. For variation, use varIndexBase

source

pub fn radius1(&self) -> UfWord

End circle radius. For variation, use varIndexBase + 5.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintSweepGradientMarker>

source

pub fn format(&self) -> u8

Set to 8.

source

pub fn color_line_offset(&self) -> Offset24

Offset to ColorLine table.

source

pub fn color_line(&self) -> Result<ColorLine<'a>, ReadError>

Attempt to resolve color_line_offset.

source

pub fn center_x(&self) -> FWord

Center x coordinate.

source

pub fn center_y(&self) -> FWord

Center y coordinate.

source

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

pub fn end_angle(&self) -> F2Dot14

End of the angular range of the gradient, 180° in counter-clockwise degrees per 1.0 of value.

source§

impl<'a> TableRef<'a, PaintVarSweepGradientMarker>

source

pub fn format(&self) -> u8

Set to 9.

source

pub fn color_line_offset(&self) -> Offset24

Offset to VarColorLine table.

source

pub fn color_line(&self) -> Result<VarColorLine<'a>, ReadError>

Attempt to resolve color_line_offset.

source

pub fn center_x(&self) -> FWord

Center x coordinate. For variation, use varIndexBase + 0.

source

pub fn center_y(&self) -> FWord

Center y coordinate. For variation, use varIndexBase + 1.

source

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.

source

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.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintGlyphMarker>

source

pub fn format(&self) -> u8

Set to 10.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint table.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn glyph_id(&self) -> GlyphId

Glyph ID for the source outline.

source§

impl<'a> TableRef<'a, PaintColrGlyphMarker>

source

pub fn format(&self) -> u8

Set to 11.

source

pub fn glyph_id(&self) -> GlyphId

Glyph ID for a BaseGlyphList base glyph.

source§

impl<'a> TableRef<'a, PaintTransformMarker>

source

pub fn format(&self) -> u8

Set to 12.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn transform_offset(&self) -> Offset24

Offset to an Affine2x3 table.

source

pub fn transform(&self) -> Result<Affine2x3<'a>, ReadError>

Attempt to resolve transform_offset.

source§

impl<'a> TableRef<'a, PaintVarTransformMarker>

source

pub fn format(&self) -> u8

Set to 13.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn transform_offset(&self) -> Offset24

Offset to a VarAffine2x3 table.

source

pub fn transform(&self) -> Result<VarAffine2x3<'a>, ReadError>

Attempt to resolve transform_offset.

source§

impl<'a> TableRef<'a, Affine2x3Marker>

source

pub fn xx(&self) -> Fixed

x-component of transformed x-basis vector.

source

pub fn yx(&self) -> Fixed

y-component of transformed x-basis vector.

source

pub fn xy(&self) -> Fixed

x-component of transformed y-basis vector.

source

pub fn yy(&self) -> Fixed

y-component of transformed y-basis vector.

source

pub fn dx(&self) -> Fixed

Translation in x direction.

source

pub fn dy(&self) -> Fixed

Translation in y direction.

source§

impl<'a> TableRef<'a, VarAffine2x3Marker>

source

pub fn xx(&self) -> Fixed

x-component of transformed x-basis vector. For variation, use varIndexBase + 0.

source

pub fn yx(&self) -> Fixed

y-component of transformed x-basis vector. For variation, use varIndexBase + 1.

source

pub fn xy(&self) -> Fixed

x-component of transformed y-basis vector. For variation, use varIndexBase + 2.

source

pub fn yy(&self) -> Fixed

y-component of transformed y-basis vector. For variation, use varIndexBase + 3.

source

pub fn dx(&self) -> Fixed

Translation in x direction. For variation, use varIndexBase + 4.

source

pub fn dy(&self) -> Fixed

Translation in y direction. For variation, use varIndexBase + 5.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintTranslateMarker>

source

pub fn format(&self) -> u8

Set to 14.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn dx(&self) -> FWord

Translation in x direction.

source

pub fn dy(&self) -> FWord

Translation in y direction.

source§

impl<'a> TableRef<'a, PaintVarTranslateMarker>

source

pub fn format(&self) -> u8

Set to 15.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn dx(&self) -> FWord

Translation in x direction. For variation, use varIndexBase + 0.

source

pub fn dy(&self) -> FWord

Translation in y direction. For variation, use varIndexBase + 1.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintScaleMarker>

source

pub fn format(&self) -> u8

Set to 16.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale_x(&self) -> F2Dot14

Scale factor in x direction.

source

pub fn scale_y(&self) -> F2Dot14

Scale factor in y direction.

source§

impl<'a> TableRef<'a, PaintVarScaleMarker>

source

pub fn format(&self) -> u8

Set to 17.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale_x(&self) -> F2Dot14

Scale factor in x direction. For variation, use varIndexBase + 0.

source

pub fn scale_y(&self) -> F2Dot14

Scale factor in y direction. For variation, use varIndexBase + 1.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintScaleAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 18.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale_x(&self) -> F2Dot14

Scale factor in x direction.

source

pub fn scale_y(&self) -> F2Dot14

Scale factor in y direction.

source

pub fn center_x(&self) -> FWord

x coordinate for the center of scaling.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of scaling.

source§

impl<'a> TableRef<'a, PaintVarScaleAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 19.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale_x(&self) -> F2Dot14

Scale factor in x direction. For variation, use varIndexBase + 0.

source

pub fn scale_y(&self) -> F2Dot14

Scale factor in y direction. For variation, use varIndexBase + 1.

source

pub fn center_x(&self) -> FWord

x coordinate for the center of scaling. For variation, use varIndexBase + 2.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of scaling. For variation, use varIndexBase + 3.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintScaleUniformMarker>

source

pub fn format(&self) -> u8

Set to 20.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale(&self) -> F2Dot14

Scale factor in x and y directions.

source§

impl<'a> TableRef<'a, PaintVarScaleUniformMarker>

source

pub fn format(&self) -> u8

Set to 21.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale(&self) -> F2Dot14

Scale factor in x and y directions. For variation, use varIndexBase + 0.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintScaleUniformAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 22.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale(&self) -> F2Dot14

Scale factor in x and y directions.

source

pub fn center_x(&self) -> FWord

x coordinate for the center of scaling.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of scaling.

source§

impl<'a> TableRef<'a, PaintVarScaleUniformAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 23.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn scale(&self) -> F2Dot14

Scale factor in x and y directions. For variation, use varIndexBase + 0.

source

pub fn center_x(&self) -> FWord

x coordinate for the center of scaling. For variation, use varIndexBase + 1.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of scaling. For variation, use varIndexBase + 2.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintRotateMarker>

source

pub fn format(&self) -> u8

Set to 24.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn angle(&self) -> F2Dot14

Rotation angle, 180° in counter-clockwise degrees per 1.0 of value.

source§

impl<'a> TableRef<'a, PaintVarRotateMarker>

source

pub fn format(&self) -> u8

Set to 25.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn angle(&self) -> F2Dot14

Rotation angle, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 0.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintRotateAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 26.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn angle(&self) -> F2Dot14

Rotation angle, 180° in counter-clockwise degrees per 1.0 of value.

source

pub fn center_x(&self) -> FWord

x coordinate for the center of rotation.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of rotation.

source§

impl<'a> TableRef<'a, PaintVarRotateAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 27.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

pub fn angle(&self) -> F2Dot14

Rotation angle, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 0.

source

pub fn center_x(&self) -> FWord

x coordinate for the center of rotation. For variation, use varIndexBase + 1.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of rotation. For variation, use varIndexBase + 2.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintSkewMarker>

source

pub fn format(&self) -> u8

Set to 28.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

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.

source

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>

source

pub fn format(&self) -> u8

Set to 29.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

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.

source

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.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintSkewAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 30.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

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.

source

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

pub fn center_x(&self) -> FWord

x coordinate for the center of rotation.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of rotation.

source§

impl<'a> TableRef<'a, PaintVarSkewAroundCenterMarker>

source

pub fn format(&self) -> u8

Set to 31.

source

pub fn paint_offset(&self) -> Offset24

Offset to a Paint subtable.

source

pub fn paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve paint_offset.

source

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.

source

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.

source

pub fn center_x(&self) -> FWord

x coordinate for the center of rotation. For variation, use varIndexBase + 2.

source

pub fn center_y(&self) -> FWord

y coordinate for the center of rotation. For variation, use varIndexBase + 3.

source

pub fn var_index_base(&self) -> u32

Base index into DeltaSetIndexMap.

source§

impl<'a> TableRef<'a, PaintCompositeMarker>

source

pub fn format(&self) -> u8

Set to 32.

source

pub fn source_paint_offset(&self) -> Offset24

Offset to a source Paint table.

source

pub fn source_paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve source_paint_offset.

source

pub fn composite_mode(&self) -> CompositeMode

A CompositeMode enumeration value.

source

pub fn backdrop_paint_offset(&self) -> Offset24

Offset to a backdrop Paint table.

source

pub fn backdrop_paint(&self) -> Result<Paint<'a>, ReadError>

Attempt to resolve backdrop_paint_offset.

source§

impl<'a> TableRef<'a, ColrMarker>

source

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.

source

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.

source

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

pub fn v1_layer(&self, index: usize) -> Result<(Paint<'a>, PaintId), ReadError>

Returns the COLRv1 layer at the given index.

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

pub fn v1_clip_box( &self, glyph_id: GlyphId ) -> Result<Option<ClipBox<'a>>, ReadError>

Returns the COLRv1 clip box for the given glyph identifier.

source§

impl<'a> TableRef<'a, CpalMarker>

source

pub fn version(&self) -> u16

Table version number (=0).

source

pub fn num_palette_entries(&self) -> u16

Number of palette entries in each palette.

source

pub fn num_palettes(&self) -> u16

Number of palettes in the table.

source

pub fn num_color_records(&self) -> u16

Total number of color records, combined for all palettes.

source

pub fn color_records_array_offset(&self) -> Nullable<Offset32>

Offset from the beginning of CPAL table to the first ColorRecord.

source

pub fn color_records_array( &self ) -> Option<Result<&'a [ColorRecord], ReadError>>

Attempt to resolve color_records_array_offset.

source

pub fn color_record_indices(&self) -> &'a [BigEndian<u16>]

Index of each palette’s first color record in the combined color record array.

source

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.

source

pub fn palette_types_array( &self ) -> Option<Result<&'a [BigEndian<PaletteType>], ReadError>>

Attempt to resolve palette_types_array_offset.

source

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.

source

pub fn palette_labels_array( &self ) -> Option<Result<&'a [BigEndian<u16>], ReadError>>

Attempt to resolve palette_labels_array_offset.

source

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.

source

pub fn palette_entry_labels_array( &self ) -> Option<Result<&'a [BigEndian<NameId>], ReadError>>

source§

impl<'a> TableRef<'a, CvarMarker>

source

pub fn version(&self) -> MajorMinor

Major/minor version number of the CVT variations table — set to (1,0).

source

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.

source

pub fn data_offset(&self) -> Offset16

Offset from the start of the ‘cvar’ table to the serialized data.

source

pub fn data(&self) -> Result<FontData<'a>, ReadError>

Attempt to resolve data_offset.

source

pub fn tuple_variation_headers( &self ) -> VarLenArray<'a, TupleVariationHeader<'_>>

Array of tuple variation headers.

source§

impl<'a> TableRef<'a, CvarMarker>

source

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.

source

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>

source

pub fn major_version(&self) -> u16

Major version of the EBDT table, = 2.

source

pub fn minor_version(&self) -> u16

Minor version of EBDT table, = 0.

source§

impl<'a> TableRef<'a, EbdtMarker>

source

pub fn data( &self, location: &BitmapLocation ) -> Result<BitmapData<'a>, ReadError>

source§

impl<'a> TableRef<'a, EblcMarker>

source

pub fn major_version(&self) -> u16

Major version of the EBLC table, = 2.

source

pub fn minor_version(&self) -> u16

Minor version of EBLC table, = 0.

source

pub fn num_sizes(&self) -> u32

Number of BitmapSize records.

source

pub fn bitmap_sizes(&self) -> &'a [BitmapSize]

BitmapSize records array.

source§

impl<'a> TableRef<'a, FvarMarker>

source

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.

source

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.

source

pub fn axis_instance_arrays(&self) -> Result<AxisInstanceArrays<'a>, ReadError>

Attempt to resolve axis_instance_arrays_offset.

source

pub fn axis_count(&self) -> u16

The number of variation axes in the font (the number of records in the axes array).

source

pub fn axis_size(&self) -> u16

The size in bytes of each VariationAxisRecord — set to 20 (0x0014) for this version.

source

pub fn instance_count(&self) -> u16

The number of named instances defined in the font (the number of records in the instances array).

source

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>

source

pub fn read( data: FontData<'a>, axis_count: u16, instance_count: u16, instance_size: u16 ) -> 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, AxisInstanceArraysMarker>

source

pub fn axes(&self) -> &'a [VariationAxisRecord]

Variation axis record array.

source

pub fn instances(&self) -> ComputedArray<'a, InstanceRecord<'a>>

Instance record array.

source§

impl<'a> TableRef<'a, FvarMarker>

source

pub fn axes(&self) -> Result<&'a [VariationAxisRecord], ReadError>

Returns the array of variation axis records.

source

pub fn instances( &self ) -> Result<ComputedArray<'a, InstanceRecord<'a>>, ReadError>

Returns the array of instance records.

source§

impl<'a> TableRef<'a, GaspMarker>

source

pub fn version(&self) -> u16

Version number (set to 1)

source

pub fn num_ranges(&self) -> u16

Number of records to follow

source

pub fn gasp_ranges(&self) -> &'a [GaspRange]

Sorted by ppem

source§

impl<'a> TableRef<'a, GdefMarker>

source

pub fn version(&self) -> MajorMinor

The major/minor version of the GDEF table

source

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)

source

pub fn glyph_class_def(&self) -> Option<Result<ClassDef<'a>, ReadError>>

Attempt to resolve glyph_class_def_offset.

source

pub fn attach_list_offset(&self) -> Nullable<Offset16>

Offset to attachment point list table, from beginning of GDEF header (may be NULL)

source

pub fn attach_list(&self) -> Option<Result<AttachList<'a>, ReadError>>

Attempt to resolve attach_list_offset.

source

pub fn lig_caret_list_offset(&self) -> Nullable<Offset16>

Offset to ligature caret list table, from beginning of GDEF header (may be NULL)

source

pub fn lig_caret_list(&self) -> Option<Result<LigCaretList<'a>, ReadError>>

Attempt to resolve lig_caret_list_offset.

source

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)

source

pub fn mark_attach_class_def(&self) -> Option<Result<ClassDef<'a>, ReadError>>

Attempt to resolve mark_attach_class_def_offset.

source

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)

source

pub fn mark_glyph_sets_def( &self ) -> Option<Result<MarkGlyphSets<'a>, ReadError>>

Attempt to resolve mark_glyph_sets_def_offset.

source

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)

source

pub fn item_var_store( &self ) -> Option<Result<ItemVariationStore<'a>, ReadError>>

Attempt to resolve item_var_store_offset.

source§

impl<'a> TableRef<'a, AttachListMarker>

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table - from beginning of AttachList table

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn glyph_count(&self) -> u16

Number of glyphs with attachment points

source

pub fn attach_point_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to AttachPoint tables-from beginning of AttachList table-in Coverage Index order

source

pub fn attach_points(&self) -> ArrayOfOffsets<'a, AttachPoint<'a>, Offset16>

A dynamically resolving wrapper for attach_point_offsets.

source§

impl<'a> TableRef<'a, AttachPointMarker>

source

pub fn point_count(&self) -> u16

Number of attachment points on this glyph

source

pub fn point_indices(&self) -> &'a [BigEndian<u16>]

Array of contour point indices -in increasing numerical order

source§

impl<'a> TableRef<'a, LigCaretListMarker>

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table - from beginning of LigCaretList table

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn lig_glyph_count(&self) -> u16

Number of ligature glyphs

source

pub fn lig_glyph_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to LigGlyph tables, from beginning of LigCaretList table —in Coverage Index order

source

pub fn lig_glyphs(&self) -> ArrayOfOffsets<'a, LigGlyph<'a>, Offset16>

A dynamically resolving wrapper for lig_glyph_offsets.

source§

impl<'a> TableRef<'a, LigGlyphMarker>

source

pub fn caret_count(&self) -> u16

Number of CaretValue tables for this ligature (components - 1)

source

pub fn caret_value_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to CaretValue tables, from beginning of LigGlyph table — in increasing coordinate order

source

pub fn caret_values(&self) -> ArrayOfOffsets<'a, CaretValue<'a>, Offset16>

A dynamically resolving wrapper for caret_value_offsets.

source§

impl<'a> TableRef<'a, CaretValueFormat1Marker>

source

pub fn caret_value_format(&self) -> u16

Format identifier: format = 1

source

pub fn coordinate(&self) -> i16

X or Y value, in design units

source§

impl<'a> TableRef<'a, CaretValueFormat2Marker>

source

pub fn caret_value_format(&self) -> u16

Format identifier: format = 2

source

pub fn caret_value_point_index(&self) -> u16

Contour point index on glyph

source§

impl<'a> TableRef<'a, CaretValueFormat3Marker>

source

pub fn caret_value_format(&self) -> u16

Format identifier-format = 3

source

pub fn coordinate(&self) -> i16

X or Y value, in design units

source

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

source

pub fn device(&self) -> Result<DeviceOrVariationIndex<'a>, ReadError>

Attempt to resolve device_offset.

source§

impl<'a> TableRef<'a, MarkGlyphSetsMarker>

source

pub fn format(&self) -> u16

Format identifier == 1

source

pub fn mark_glyph_set_count(&self) -> u16

Number of mark glyph sets defined

source

pub fn coverage_offsets(&self) -> &'a [BigEndian<Offset32>]

Array of offsets to mark glyph set coverage tables, from the start of the MarkGlyphSets table.

source

pub fn coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset32>

A dynamically resolving wrapper for coverage_offsets.

source§

impl<'a> TableRef<'a, SimpleGlyphMarker>

source

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.

source

pub fn x_min(&self) -> i16

Minimum x for coordinate data.

source

pub fn y_min(&self) -> i16

Minimum y for coordinate data.

source

pub fn x_max(&self) -> i16

Maximum x for coordinate data.

source

pub fn y_max(&self) -> i16

Maximum y for coordinate data.

source

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

source

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.

source

pub fn instructions(&self) -> &'a [u8]

Array of instruction byte code for the glyph.

source

pub fn glyph_data(&self) -> &'a [u8]

the raw data for flags & x/y coordinates

source§

impl<'a> TableRef<'a, CompositeGlyphMarker>

source

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.

source

pub fn x_min(&self) -> i16

Minimum x for coordinate data.

source

pub fn y_min(&self) -> i16

Minimum y for coordinate data.

source

pub fn x_max(&self) -> i16

Maximum x for coordinate data.

source

pub fn y_max(&self) -> i16

Maximum y for coordinate data.

source

pub fn component_data(&self) -> &'a [u8]

component flag glyph index of component

source§

impl<'a> TableRef<'a, SimpleGlyphMarker>

source

pub fn num_points(&self) -> usize

Returns the total number of points.

source

pub fn has_overlapping_contours(&self) -> bool

Returns true if the contours in the simple glyph may overlap.

source

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.

source

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>

source

pub fn components(&self) -> impl Iterator<Item = Component> + 'a + Clone

Returns an iterator over the components of the composite glyph.

source

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.

source

pub fn count_and_instructions(&self) -> (usize, Option<&'a [u8]>)

Returns the component count and TrueType interpreter instructions in a single pass.

source

pub fn instructions(&self) -> Option<&'a [u8]>

Returns the TrueType interpreter instructions.

source§

impl<'a> TableRef<'a, GposMarker>

source

pub fn version(&self) -> MajorMinor

The major and minor version of the GPOS table, as a tuple (u16, u16)

source

pub fn script_list_offset(&self) -> Offset16

Offset to ScriptList table, from beginning of GPOS table

source

pub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>

Attempt to resolve script_list_offset.

source

pub fn feature_list_offset(&self) -> Offset16

Offset to FeatureList table, from beginning of GPOS table

source

pub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>

Attempt to resolve feature_list_offset.

source

pub fn lookup_list_offset(&self) -> Offset16

Offset to LookupList table, from beginning of GPOS table

source

pub fn lookup_list(&self) -> Result<PositionLookupList<'a>, ReadError>

Attempt to resolve lookup_list_offset.

source

pub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>

source

pub fn feature_variations( &self ) -> Option<Result<FeatureVariations<'a>, ReadError>>

Attempt to resolve feature_variations_offset.

source§

impl<'a> TableRef<'a, AnchorFormat1Marker>

source

pub fn anchor_format(&self) -> u16

Format identifier, = 1

source

pub fn x_coordinate(&self) -> i16

Horizontal value, in design units

source

pub fn y_coordinate(&self) -> i16

Vertical value, in design units

source§

impl<'a> TableRef<'a, AnchorFormat2Marker>

source

pub fn anchor_format(&self) -> u16

Format identifier, = 2

source

pub fn x_coordinate(&self) -> i16

Horizontal value, in design units

source

pub fn y_coordinate(&self) -> i16

Vertical value, in design units

source

pub fn anchor_point(&self) -> u16

Index to glyph contour point

source§

impl<'a> TableRef<'a, AnchorFormat3Marker>

source

pub fn anchor_format(&self) -> u16

Format identifier, = 3

source

pub fn x_coordinate(&self) -> i16

Horizontal value, in design units

source

pub fn y_coordinate(&self) -> i16

Vertical value, in design units

source

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)

source

pub fn x_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>

Attempt to resolve x_device_offset.

source

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)

source

pub fn y_device(&self) -> Option<Result<DeviceOrVariationIndex<'a>, ReadError>>

Attempt to resolve y_device_offset.

source§

impl<'a> TableRef<'a, MarkArrayMarker>

source

pub fn mark_count(&self) -> u16

Number of MarkRecords

source

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>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of SinglePos subtable.

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn value_format(&self) -> ValueFormat

Defines the types of data in the ValueRecord.

source

pub fn value_record(&self) -> ValueRecord

Defines positioning value(s) — applied to all glyphs in the Coverage table.

source§

impl<'a> TableRef<'a, SinglePosFormat2Marker>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 2

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of SinglePos subtable.

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn value_format(&self) -> ValueFormat

Defines the types of data in the ValueRecords.

source

pub fn value_count(&self) -> u16

Number of ValueRecords — must equal glyphCount in the Coverage table.

source

pub fn value_records(&self) -> ComputedArray<'a, ValueRecord>

Array of ValueRecords — positioning values applied to glyphs.

source§

impl<'a> TableRef<'a, PairPosFormat1Marker>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of PairPos subtable.

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn value_format1(&self) -> ValueFormat

Defines the types of data in valueRecord1 — for the first glyph in the pair (may be zero).

source

pub fn value_format2(&self) -> ValueFormat

Defines the types of data in valueRecord2 — for the second glyph in the pair (may be zero).

source

pub fn pair_set_count(&self) -> u16

Number of PairSet tables

source

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.

source

pub fn pair_sets(&self) -> ArrayOfOffsets<'a, PairSet<'a>, Offset16>

A dynamically resolving wrapper for pair_set_offsets.

source§

impl<'a> TableRef<'a, PairSetMarker>

source

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>

source

pub fn pair_value_count(&self) -> u16

Number of PairValueRecords

source

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>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 2

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of PairPos subtable.

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn value_format1(&self) -> ValueFormat

ValueRecord definition — for the first glyph of the pair (may be zero).

source

pub fn value_format2(&self) -> ValueFormat

ValueRecord definition — for the second glyph of the pair (may be zero).

source

pub fn class_def1_offset(&self) -> Offset16

Offset to ClassDef table, from beginning of PairPos subtable — for the first glyph of the pair.

source

pub fn class_def1(&self) -> Result<ClassDef<'a>, ReadError>

Attempt to resolve class_def1_offset.

source

pub fn class_def2_offset(&self) -> Offset16

Offset to ClassDef table, from beginning of PairPos subtable — for the second glyph of the pair.

source

pub fn class_def2(&self) -> Result<ClassDef<'a>, ReadError>

Attempt to resolve class_def2_offset.

source

pub fn class1_count(&self) -> u16

Number of classes in classDef1 table — includes Class 0.

source

pub fn class2_count(&self) -> u16

Number of classes in classDef2 table — includes Class 0.

source

pub fn class1_records(&self) -> ComputedArray<'a, Class1Record<'a>>

Array of Class1 records, ordered by classes in classDef1.

source§

impl<'a> TableRef<'a, CursivePosFormat1Marker>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of CursivePos subtable.

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn entry_exit_count(&self) -> u16

Number of EntryExit records

source

pub fn entry_exit_record(&self) -> &'a [EntryExitRecord]

Array of EntryExit records, in Coverage index order.

source§

impl<'a> TableRef<'a, MarkBasePosFormat1Marker>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 1

source

pub fn mark_coverage_offset(&self) -> Offset16

Offset to markCoverage table, from beginning of MarkBasePos subtable.

source

pub fn mark_coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve mark_coverage_offset.

source

pub fn base_coverage_offset(&self) -> Offset16

Offset to baseCoverage table, from beginning of MarkBasePos subtable.

source

pub fn base_coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve base_coverage_offset.

source

pub fn mark_class_count(&self) -> u16

Number of classes defined for marks

source

pub fn mark_array_offset(&self) -> Offset16

Offset to MarkArray table, from beginning of MarkBasePos subtable.

source

pub fn mark_array(&self) -> Result<MarkArray<'a>, ReadError>

Attempt to resolve mark_array_offset.

source

pub fn base_array_offset(&self) -> Offset16

Offset to BaseArray table, from beginning of MarkBasePos subtable.

source

pub fn base_array(&self) -> Result<BaseArray<'a>, ReadError>

Attempt to resolve base_array_offset.

source§

impl<'a> TableRef<'a, BaseArrayMarker>

source

pub fn read( data: FontData<'a>, mark_class_count: u16 ) -> 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, BaseArrayMarker>

source

pub fn base_count(&self) -> u16

Number of BaseRecords

source

pub fn base_records(&self) -> ComputedArray<'a, BaseRecord<'a>>

Array of BaseRecords, in order of baseCoverage Index.

source§

impl<'a> TableRef<'a, MarkLigPosFormat1Marker>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 1

source

pub fn mark_coverage_offset(&self) -> Offset16

Offset to markCoverage table, from beginning of MarkLigPos subtable.

source

pub fn mark_coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve mark_coverage_offset.

source

pub fn ligature_coverage_offset(&self) -> Offset16

Offset to ligatureCoverage table, from beginning of MarkLigPos subtable.

source

pub fn ligature_coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve ligature_coverage_offset.

source

pub fn mark_class_count(&self) -> u16

Number of defined mark classes

source

pub fn mark_array_offset(&self) -> Offset16

Offset to MarkArray table, from beginning of MarkLigPos subtable.

source

pub fn mark_array(&self) -> Result<MarkArray<'a>, ReadError>

Attempt to resolve mark_array_offset.

source

pub fn ligature_array_offset(&self) -> Offset16

Offset to LigatureArray table, from beginning of MarkLigPos subtable.

source

pub fn ligature_array(&self) -> Result<LigatureArray<'a>, ReadError>

Attempt to resolve ligature_array_offset.

source§

impl<'a> TableRef<'a, LigatureArrayMarker>

source

pub fn read( data: FontData<'a>, mark_class_count: u16 ) -> 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, LigatureArrayMarker>

source

pub fn ligature_count(&self) -> u16

Number of LigatureAttach table offsets

source

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.

source

pub fn ligature_attaches( &self ) -> ArrayOfOffsets<'a, LigatureAttach<'a>, Offset16>

A dynamically resolving wrapper for ligature_attach_offsets.

source§

impl<'a> TableRef<'a, LigatureAttachMarker>

source

pub fn read( data: FontData<'a>, mark_class_count: u16 ) -> 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, LigatureAttachMarker>

source

pub fn component_count(&self) -> u16

Number of ComponentRecords in this ligature

source

pub fn component_records(&self) -> ComputedArray<'a, ComponentRecord<'a>>

Array of Component records, ordered in writing direction.

source§

impl<'a> TableRef<'a, MarkMarkPosFormat1Marker>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 1

source

pub fn mark1_coverage_offset(&self) -> Offset16

Offset to Combining Mark Coverage table, from beginning of MarkMarkPos subtable.

source

pub fn mark1_coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve mark1_coverage_offset.

source

pub fn mark2_coverage_offset(&self) -> Offset16

Offset to Base Mark Coverage table, from beginning of MarkMarkPos subtable.

source

pub fn mark2_coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve mark2_coverage_offset.

source

pub fn mark_class_count(&self) -> u16

Number of Combining Mark classes defined

source

pub fn mark1_array_offset(&self) -> Offset16

Offset to MarkArray table for mark1, from beginning of MarkMarkPos subtable.

source

pub fn mark1_array(&self) -> Result<MarkArray<'a>, ReadError>

Attempt to resolve mark1_array_offset.

source

pub fn mark2_array_offset(&self) -> Offset16

Offset to Mark2Array table for mark2, from beginning of MarkMarkPos subtable.

source

pub fn mark2_array(&self) -> Result<Mark2Array<'a>, ReadError>

Attempt to resolve mark2_array_offset.

source§

impl<'a> TableRef<'a, Mark2ArrayMarker>

source

pub fn read( data: FontData<'a>, mark_class_count: u16 ) -> 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, Mark2ArrayMarker>

source

pub fn mark2_count(&self) -> u16

Number of Mark2 records

source

pub fn mark2_records(&self) -> ComputedArray<'a, Mark2Record<'a>>

Array of Mark2Records, in Coverage order.

source§

impl<'a, T> TableRef<'a, ExtensionPosFormat1Marker<T>>

source

pub fn pos_format(&self) -> u16

Format identifier: format = 1

source

pub fn extension_lookup_type(&self) -> u16

Lookup type of subtable referenced by extensionOffset (i.e. the extension subtable).

source

pub fn extension_offset(&self) -> Offset32

Offset to the extension subtable, of lookup type extensionLookupType, relative to the start of the ExtensionPosFormat1 subtable.

source

pub fn extension(&self) -> Result<T, ReadError>
where T: FontRead<'a>,

Attempt to resolve extension_offset.

source§

impl<'a> TableRef<'a, GsubMarker>

source

pub fn closure_glyphs( &self, glyphs: HashSet<GlyphId> ) -> Result<HashSet<GlyphId>, ReadError>

Return the set of glyphs reachable from the input set via any substituion.

source§

impl<'a> TableRef<'a, GsubMarker>

source

pub fn version(&self) -> MajorMinor

The major and minor version of the GSUB table, as a tuple (u16, u16)

source

pub fn script_list_offset(&self) -> Offset16

Offset to ScriptList table, from beginning of GSUB table

source

pub fn script_list(&self) -> Result<ScriptList<'a>, ReadError>

Attempt to resolve script_list_offset.

source

pub fn feature_list_offset(&self) -> Offset16

Offset to FeatureList table, from beginning of GSUB table

source

pub fn feature_list(&self) -> Result<FeatureList<'a>, ReadError>

Attempt to resolve feature_list_offset.

source

pub fn lookup_list_offset(&self) -> Offset16

Offset to LookupList table, from beginning of GSUB table

source

pub fn lookup_list(&self) -> Result<SubstitutionLookupList<'a>, ReadError>

Attempt to resolve lookup_list_offset.

source

pub fn feature_variations_offset(&self) -> Option<Nullable<Offset32>>

Offset to FeatureVariations table, from beginning of the GSUB table (may be NULL)

source

pub fn feature_variations( &self ) -> Option<Result<FeatureVariations<'a>, ReadError>>

Attempt to resolve feature_variations_offset.

source§

impl<'a> TableRef<'a, SingleSubstFormat1Marker>

source

pub fn subst_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of substitution subtable

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn delta_glyph_id(&self) -> i16

Add to original glyph ID to get substitute glyph ID

source§

impl<'a> TableRef<'a, SingleSubstFormat2Marker>

source

pub fn subst_format(&self) -> u16

Format identifier: format = 2

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of substitution subtable

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn glyph_count(&self) -> u16

Number of glyph IDs in the substituteGlyphIDs array

source

pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]

Array of substitute glyph IDs — ordered by Coverage index

source§

impl<'a> TableRef<'a, MultipleSubstFormat1Marker>

source

pub fn subst_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of substitution subtable

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn sequence_count(&self) -> u16

Number of Sequence table offsets in the sequenceOffsets array

source

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

source

pub fn sequences(&self) -> ArrayOfOffsets<'a, Sequence<'a>, Offset16>

A dynamically resolving wrapper for sequence_offsets.

source§

impl<'a> TableRef<'a, SequenceMarker>

source

pub fn glyph_count(&self) -> u16

Number of glyph IDs in the substituteGlyphIDs array. This must always be greater than 0.

source

pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]

String of glyph IDs to substitute

source§

impl<'a> TableRef<'a, AlternateSubstFormat1Marker>

source

pub fn subst_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of substitution subtable

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn alternate_set_count(&self) -> u16

Number of AlternateSet tables

source

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

source

pub fn alternate_sets(&self) -> ArrayOfOffsets<'a, AlternateSet<'a>, Offset16>

A dynamically resolving wrapper for alternate_set_offsets.

source§

impl<'a> TableRef<'a, AlternateSetMarker>

source

pub fn glyph_count(&self) -> u16

Number of glyph IDs in the alternateGlyphIDs array

source

pub fn alternate_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]

Array of alternate glyph IDs, in arbitrary order

source§

impl<'a> TableRef<'a, LigatureSubstFormat1Marker>

source

pub fn subst_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of substitution subtable

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn ligature_set_count(&self) -> u16

Number of LigatureSet tables

source

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

source

pub fn ligature_sets(&self) -> ArrayOfOffsets<'a, LigatureSet<'a>, Offset16>

A dynamically resolving wrapper for ligature_set_offsets.

source§

impl<'a> TableRef<'a, LigatureSetMarker>

source

pub fn ligature_count(&self) -> u16

Number of Ligature tables

source

pub fn ligature_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to Ligature tables. Offsets are from beginning of LigatureSet table, ordered by preference.

source

pub fn ligatures(&self) -> ArrayOfOffsets<'a, Ligature<'a>, Offset16>

A dynamically resolving wrapper for ligature_offsets.

source§

impl<'a> TableRef<'a, LigatureMarker>

source

pub fn ligature_glyph(&self) -> GlyphId

glyph ID of ligature to substitute

source

pub fn component_count(&self) -> u16

Number of components in the ligature

source

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>>

source

pub fn subst_format(&self) -> u16

Format identifier. Set to 1.

source

pub fn extension_lookup_type(&self) -> u16

Lookup type of subtable referenced by extensionOffset (that is, the extension subtable).

source

pub fn extension_offset(&self) -> Offset32

Offset to the extension subtable, of lookup type extensionLookupType, relative to the start of the ExtensionSubstFormat1 subtable.

source

pub fn extension(&self) -> Result<T, ReadError>
where T: FontRead<'a>,

Attempt to resolve extension_offset.

source§

impl<'a> TableRef<'a, ReverseChainSingleSubstFormat1Marker>

source

pub fn subst_format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of substitution subtable.

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn backtrack_glyph_count(&self) -> u16

Number of glyphs in the backtrack sequence.

source

pub fn backtrack_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to coverage tables in backtrack sequence, in glyph sequence order.

source

pub fn backtrack_coverages( &self ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>

A dynamically resolving wrapper for backtrack_coverage_offsets.

source

pub fn lookahead_glyph_count(&self) -> u16

Number of glyphs in lookahead sequence.

source

pub fn lookahead_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to coverage tables in lookahead sequence, in glyph sequence order.

source

pub fn lookahead_coverages( &self ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>

A dynamically resolving wrapper for lookahead_coverage_offsets.

source

pub fn glyph_count(&self) -> u16

Number of glyph IDs in the substituteGlyphIDs array.

source

pub fn substitute_glyph_ids(&self) -> &'a [BigEndian<GlyphId>]

Array of substitute glyph IDs — ordered by Coverage index.

source§

impl<'a> TableRef<'a, GvarMarker>

source

pub fn version(&self) -> MajorMinor

Major/minor version number of the glyph variations table — set to (1,0).

source

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.

source

pub fn shared_tuple_count(&self) -> u16

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.

source

pub fn shared_tuples_offset(&self) -> Offset32

Offset from the start of this table to the shared tuple records.

source

pub fn shared_tuples(&self) -> Result<SharedTuples<'a>, ReadError>

Attempt to resolve shared_tuples_offset.

source

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.

source

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.

source

pub fn glyph_variation_data_array_offset(&self) -> u32

Offset from the start of this table to the array of GlyphVariationData tables.

source

pub fn glyph_variation_data_offsets(&self) -> ComputedArray<'a, U16Or32>

Offsets from the start of the GlyphVariationData array to each GlyphVariationData table.

source§

impl<'a> TableRef<'a, SharedTuplesMarker>

source

pub fn read( data: FontData<'a>, shared_tuple_count: u16, axis_count: u16 ) -> 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, SharedTuplesMarker>

source

pub fn tuples(&self) -> ComputedArray<'a, Tuple<'a>>

source§

impl<'a> TableRef<'a, GlyphVariationDataHeaderMarker>

source

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.

source

pub fn serialized_data_offset(&self) -> Offset16

Offset from the start of the GlyphVariationData table to the serialized data

source

pub fn serialized_data(&self) -> Result<FontData<'a>, ReadError>

Attempt to resolve serialized_data_offset.

source

pub fn tuple_variation_headers( &self ) -> VarLenArray<'a, TupleVariationHeader<'_>>

Array of tuple variation headers.

source§

impl<'a> TableRef<'a, GvarMarker>

source

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>

source

pub fn version(&self) -> MajorMinor

Version number of the font header table, set to (1, 0)

source

pub fn font_revision(&self) -> Fixed

Set by font manufacturer.

source

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.

source

pub fn magic_number(&self) -> u32

Set to 0x5F0F3CF5.

source

pub fn flags(&self) -> u16

See the flags enum

source

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.

source

pub fn created(&self) -> LongDateTime

Number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.

source

pub fn modified(&self) -> LongDateTime

Number of seconds since 12:00 midnight that started January 1st 1904 in GMT/UTC time zone.

source

pub fn x_min(&self) -> i16

Minimum x coordinate across all glyph bounding boxes.

source

pub fn y_min(&self) -> i16

Minimum y coordinate across all glyph bounding boxes.

source

pub fn x_max(&self) -> i16

Maximum x coordinate across all glyph bounding boxes.

source

pub fn y_max(&self) -> i16

Maximum y coordinate across all glyph bounding boxes.

source

pub fn mac_style(&self) -> MacStyle

see somewhere else

source

pub fn lowest_rec_ppem(&self) -> u16

Smallest readable size in pixels.

source

pub fn font_direction_hint(&self) -> i16

Deprecated (Set to 2).

source

pub fn index_to_loc_format(&self) -> i16

0 for short offsets (Offset16), 1 for long (Offset32).

source

pub fn glyph_data_format(&self) -> i16

0 for current format.

source§

impl<'a> TableRef<'a, HheaMarker>

source

pub fn version(&self) -> MajorMinor

The major/minor version (1, 0)

source

pub fn ascender(&self) -> FWord

Typographic ascent.

source

pub fn descender(&self) -> FWord

Typographic descent.

source

pub fn line_gap(&self) -> FWord

Typographic line gap. Negative LineGap values are treated as zero in some legacy platform implementations.

source

pub fn advance_width_max(&self) -> UfWord

Maximum advance width value in ‘hmtx’ table.

source

pub fn min_left_side_bearing(&self) -> FWord

Minimum left sidebearing value in ‘hmtx’ table for glyphs with contours (empty glyphs should be ignored).

source

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).

source

pub fn x_max_extent(&self) -> FWord

Max(lsb + (xMax-xMin))

source

pub fn caret_slope_rise(&self) -> i16

Used to calculate the slope of the cursor (rise/run); 1 for vertical caret, 0 for horizontal.

source

pub fn caret_slope_run(&self) -> i16

0 for vertical caret, 1 for horizontal.

source

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

source

pub fn metric_data_format(&self) -> i16

0 for current format.

source

pub fn number_of_long_metrics(&self) -> u16

Number of LongMetric entries in ‘hmtx’/‘vmtx’ table

source§

impl<'a> TableRef<'a, HmtxMarker>

source

pub fn read( data: FontData<'a>, number_of_h_metrics: u16, num_glyphs: u16 ) -> 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, HmtxMarker>

source

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.

source

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, HmtxMarker>

source

pub fn advance(&self, glyph_id: GlyphId) -> Option<u16>

Returns the advance width for the given glyph identifier.

source

pub fn side_bearing(&self, glyph_id: GlyphId) -> Option<i16>

Returns the left side bearing for the given glyph identifer.

source§

impl<'a> TableRef<'a, HvarMarker>

source

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.

source

pub fn item_variation_store_offset(&self) -> Offset32

Offset in bytes from the start of this table to the item variation store table.

source

pub fn item_variation_store(&self) -> Result<ItemVariationStore<'a>, ReadError>

Attempt to resolve item_variation_store_offset.

source

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).

source

pub fn advance_width_mapping( &self ) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve advance_width_mapping_offset.

source

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).

source

pub fn lsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve lsb_mapping_offset.

source

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).

source

pub fn rsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve rsb_mapping_offset.

source§

impl<'a> TableRef<'a, HvarMarker>

source

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

pub fn lsb_delta( &self, glyph_id: GlyphId, coords: &[F2Dot14] ) -> Result<Fixed, ReadError>

Returns the left side bearing delta for the specified glyph identifier and normalized variation coordinates.

source

pub fn rsb_delta( &self, glyph_id: GlyphId, coords: &[F2Dot14] ) -> Result<Fixed, ReadError>

Returns the left side bearing delta for the specified glyph identifier and normalized variation coordinates.

source§

impl<'a> TableRef<'a, ScriptListMarker>

source

pub fn script_count(&self) -> u16

Number of ScriptRecords

source

pub fn script_records(&self) -> &'a [ScriptRecord]

Array of ScriptRecords, listed alphabetically by script tag

source§

impl<'a> TableRef<'a, ScriptMarker>

source

pub fn default_lang_sys_offset(&self) -> Nullable<Offset16>

Offset to default LangSys table, from beginning of Script table — may be NULL

source

pub fn default_lang_sys(&self) -> Option<Result<LangSys<'a>, ReadError>>

Attempt to resolve default_lang_sys_offset.

source

pub fn lang_sys_count(&self) -> u16

Number of LangSysRecords for this script — excluding the default LangSys

source

pub fn lang_sys_records(&self) -> &'a [LangSysRecord]

Array of LangSysRecords, listed alphabetically by LangSys tag

source§

impl<'a> TableRef<'a, LangSysMarker>

source

pub fn required_feature_index(&self) -> u16

Index of a feature required for this language system; if no required features = 0xFFFF

source

pub fn feature_index_count(&self) -> u16

Number of feature index values for this language system — excludes the required feature

source

pub fn feature_indices(&self) -> &'a [BigEndian<u16>]

Array of indices into the FeatureList, in arbitrary order

source§

impl<'a> TableRef<'a, FeatureListMarker>

source

pub fn feature_count(&self) -> u16

Number of FeatureRecords in this table

source

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>

source

pub fn read(data: FontData<'a>, feature_tag: Tag) -> 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, FeatureMarker>

source

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

source

pub fn feature_params(&self) -> Option<Result<FeatureParams<'a>, ReadError>>

Attempt to resolve feature_params_offset.

source

pub fn lookup_index_count(&self) -> u16

Number of LookupList indices for this feature

source

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>>

source

pub fn lookup_count(&self) -> u16

Number of lookups in this table

source

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)

source

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>>

source

pub fn lookup_type(&self) -> u16

Different enumerations for GSUB and GPOS

source

pub fn lookup_flag(&self) -> LookupFlag

Lookup qualifiers

source

pub fn sub_table_count(&self) -> u16

Number of subtables for this lookup

source

pub fn subtable_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to lookup subtables, from beginning of Lookup table

source

pub fn subtables(&self) -> ArrayOfOffsets<'a, T, Offset16>
where T: FontRead<'a>,

A dynamically resolving wrapper for subtable_offsets.

source

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>

source

pub fn coverage_format(&self) -> u16

Format identifier — format = 1

source

pub fn glyph_count(&self) -> u16

Number of glyphs in the glyph array

source

pub fn glyph_array(&self) -> &'a [BigEndian<GlyphId>]

Array of glyph IDs — in numerical order

source§

impl<'a> TableRef<'a, CoverageFormat2Marker>

source

pub fn coverage_format(&self) -> u16

Format identifier — format = 2

source

pub fn range_count(&self) -> u16

Number of RangeRecords

source

pub fn range_records(&self) -> &'a [RangeRecord]

Array of glyph ranges — ordered by startGlyphID.

source§

impl<'a> TableRef<'a, ClassDefFormat1Marker>

source

pub fn class_format(&self) -> u16

Format identifier — format = 1

source

pub fn start_glyph_id(&self) -> GlyphId

First glyph ID of the classValueArray

source

pub fn glyph_count(&self) -> u16

Size of the classValueArray

source

pub fn class_value_array(&self) -> &'a [BigEndian<u16>]

Array of Class Values — one per glyph ID

source§

impl<'a> TableRef<'a, ClassDefFormat2Marker>

source

pub fn class_format(&self) -> u16

Format identifier — format = 2

source

pub fn class_range_count(&self) -> u16

Number of ClassRangeRecords

source

pub fn class_range_records(&self) -> &'a [ClassRangeRecord]

Array of ClassRangeRecords — ordered by startGlyphID

source§

impl<'a> TableRef<'a, SequenceContextFormat1Marker>

source

pub fn format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of SequenceContextFormat1 table

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn seq_rule_set_count(&self) -> u16

Number of SequenceRuleSet tables

source

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)

source

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>

source

pub fn seq_rule_count(&self) -> u16

Number of SequenceRule tables

source

pub fn seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to SequenceRule tables, from beginning of the SequenceRuleSet table

source

pub fn seq_rules(&self) -> ArrayOfOffsets<'a, SequenceRule<'a>, Offset16>

A dynamically resolving wrapper for seq_rule_offsets.

source§

impl<'a> TableRef<'a, SequenceRuleMarker>

source

pub fn glyph_count(&self) -> u16

Number of glyphs in the input glyph sequence

source

pub fn seq_lookup_count(&self) -> u16

Number of SequenceLookupRecords

source

pub fn input_sequence(&self) -> &'a [BigEndian<GlyphId>]

Array of input glyph IDs—starting with the second glyph

source

pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]

Array of Sequence lookup records

source§

impl<'a> TableRef<'a, SequenceContextFormat2Marker>

source

pub fn format(&self) -> u16

Format identifier: format = 2

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of SequenceContextFormat2 table

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn class_def_offset(&self) -> Offset16

Offset to ClassDef table, from beginning of SequenceContextFormat2 table

source

pub fn class_def(&self) -> Result<ClassDef<'a>, ReadError>

Attempt to resolve class_def_offset.

source

pub fn class_seq_rule_set_count(&self) -> u16

Number of ClassSequenceRuleSet tables

source

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)

source

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>

source

pub fn class_seq_rule_count(&self) -> u16

Number of ClassSequenceRule tables

source

pub fn class_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to ClassSequenceRule tables, from beginning of ClassSequenceRuleSet table

source

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>

source

pub fn glyph_count(&self) -> u16

Number of glyphs to be matched

source

pub fn seq_lookup_count(&self) -> u16

Number of SequenceLookupRecords

source

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

source

pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]

Array of SequenceLookupRecords

source§

impl<'a> TableRef<'a, SequenceContextFormat3Marker>

source

pub fn format(&self) -> u16

Format identifier: format = 3

source

pub fn glyph_count(&self) -> u16

Number of glyphs in the input sequence

source

pub fn seq_lookup_count(&self) -> u16

Number of SequenceLookupRecords

source

pub fn coverage_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to Coverage tables, from beginning of SequenceContextFormat3 subtable

source

pub fn coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>

A dynamically resolving wrapper for coverage_offsets.

source

pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]

Array of SequenceLookupRecords

source§

impl<'a> TableRef<'a, ChainedSequenceContextFormat1Marker>

source

pub fn format(&self) -> u16

Format identifier: format = 1

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of ChainSequenceContextFormat1 table

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn chained_seq_rule_set_count(&self) -> u16

Number of ChainedSequenceRuleSet tables

source

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)

source

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>

source

pub fn chained_seq_rule_count(&self) -> u16

Number of ChainedSequenceRule tables

source

pub fn chained_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to ChainedSequenceRule tables, from beginning of ChainedSequenceRuleSet table

source

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>

source

pub fn backtrack_glyph_count(&self) -> u16

Number of glyphs in the backtrack sequence

source

pub fn backtrack_sequence(&self) -> &'a [BigEndian<GlyphId>]

Array of backtrack glyph IDs

source

pub fn input_glyph_count(&self) -> u16

Number of glyphs in the input sequence

source

pub fn input_sequence(&self) -> &'a [BigEndian<GlyphId>]

Array of input glyph IDs—start with second glyph

source

pub fn lookahead_glyph_count(&self) -> u16

Number of glyphs in the lookahead sequence

source

pub fn lookahead_sequence(&self) -> &'a [BigEndian<GlyphId>]

Array of lookahead glyph IDs

source

pub fn seq_lookup_count(&self) -> u16

Number of SequenceLookupRecords

source

pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]

Array of SequenceLookupRecords

source§

impl<'a> TableRef<'a, ChainedSequenceContextFormat2Marker>

source

pub fn format(&self) -> u16

Format identifier: format = 2

source

pub fn coverage_offset(&self) -> Offset16

Offset to Coverage table, from beginning of ChainedSequenceContextFormat2 table

source

pub fn coverage(&self) -> Result<CoverageTable<'a>, ReadError>

Attempt to resolve coverage_offset.

source

pub fn backtrack_class_def_offset(&self) -> Offset16

Offset to ClassDef table containing backtrack sequence context, from beginning of ChainedSequenceContextFormat2 table

source

pub fn backtrack_class_def(&self) -> Result<ClassDef<'a>, ReadError>

Attempt to resolve backtrack_class_def_offset.

source

pub fn input_class_def_offset(&self) -> Offset16

Offset to ClassDef table containing input sequence context, from beginning of ChainedSequenceContextFormat2 table

source

pub fn input_class_def(&self) -> Result<ClassDef<'a>, ReadError>

Attempt to resolve input_class_def_offset.

source

pub fn lookahead_class_def_offset(&self) -> Offset16

Offset to ClassDef table containing lookahead sequence context, from beginning of ChainedSequenceContextFormat2 table

source

pub fn lookahead_class_def(&self) -> Result<ClassDef<'a>, ReadError>

Attempt to resolve lookahead_class_def_offset.

source

pub fn chained_class_seq_rule_set_count(&self) -> u16

Number of ChainedClassSequenceRuleSet tables

source

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)

source

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>

source

pub fn chained_class_seq_rule_count(&self) -> u16

Number of ChainedClassSequenceRule tables

source

pub fn chained_class_seq_rule_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to ChainedClassSequenceRule tables, from beginning of ChainedClassSequenceRuleSet

source

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>

source

pub fn backtrack_glyph_count(&self) -> u16

Number of glyphs in the backtrack sequence

source

pub fn backtrack_sequence(&self) -> &'a [BigEndian<u16>]

Array of backtrack-sequence classes

source

pub fn input_glyph_count(&self) -> u16

Total number of glyphs in the input sequence

source

pub fn input_sequence(&self) -> &'a [BigEndian<u16>]

Array of input sequence classes, beginning with the second glyph position

source

pub fn lookahead_glyph_count(&self) -> u16

Number of glyphs in the lookahead sequence

source

pub fn lookahead_sequence(&self) -> &'a [BigEndian<u16>]

Array of lookahead-sequence classes

source

pub fn seq_lookup_count(&self) -> u16

Number of SequenceLookupRecords

source

pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]

Array of SequenceLookupRecords

source§

impl<'a> TableRef<'a, ChainedSequenceContextFormat3Marker>

source

pub fn format(&self) -> u16

Format identifier: format = 3

source

pub fn backtrack_glyph_count(&self) -> u16

Number of glyphs in the backtrack sequence

source

pub fn backtrack_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to coverage tables for the backtrack sequence

source

pub fn backtrack_coverages( &self ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>

A dynamically resolving wrapper for backtrack_coverage_offsets.

source

pub fn input_glyph_count(&self) -> u16

Number of glyphs in the input sequence

source

pub fn input_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to coverage tables for the input sequence

source

pub fn input_coverages(&self) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>

A dynamically resolving wrapper for input_coverage_offsets.

source

pub fn lookahead_glyph_count(&self) -> u16

Number of glyphs in the lookahead sequence

source

pub fn lookahead_coverage_offsets(&self) -> &'a [BigEndian<Offset16>]

Array of offsets to coverage tables for the lookahead sequence

source

pub fn lookahead_coverages( &self ) -> ArrayOfOffsets<'a, CoverageTable<'a>, Offset16>

A dynamically resolving wrapper for lookahead_coverage_offsets.

source

pub fn seq_lookup_count(&self) -> u16

Number of SequenceLookupRecords

source

pub fn seq_lookup_records(&self) -> &'a [SequenceLookupRecord]

Array of SequenceLookupRecords

source§

impl<'a> TableRef<'a, DeviceMarker>

source

pub fn start_size(&self) -> u16

Smallest size to correct, in ppem

source

pub fn end_size(&self) -> u16

Largest size to correct, in ppem

source

pub fn delta_format(&self) -> DeltaFormat

Format of deltaValue array data: 0x0001, 0x0002, or 0x0003

source

pub fn delta_value(&self) -> &'a [BigEndian<u16>]

Array of compressed data

source§

impl<'a> TableRef<'a, VariationIndexMarker>

source

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.

source

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.

source

pub fn delta_format(&self) -> DeltaFormat

Format, = 0x8000

source§

impl<'a> TableRef<'a, FeatureVariationsMarker>

source

pub fn version(&self) -> MajorMinor

source

pub fn feature_variation_record_count(&self) -> u32

Number of feature variation records.

source

pub fn feature_variation_records(&self) -> &'a [FeatureVariationRecord]

Array of feature variation records.

source§

impl<'a> TableRef<'a, ConditionSetMarker>

source

pub fn condition_count(&self) -> u16

Number of conditions for this condition set.

source

pub fn condition_offsets(&self) -> &'a [BigEndian<Offset32>]

Array of offsets to condition tables, from beginning of the ConditionSet table.

source

pub fn conditions(&self) -> ArrayOfOffsets<'a, ConditionFormat1<'a>, Offset32>

A dynamically resolving wrapper for condition_offsets.

source§

impl<'a> TableRef<'a, ConditionFormat1Marker>

source

pub fn format(&self) -> u16

Format, = 1

source

pub fn axis_index(&self) -> u16

Index (zero-based) for the variation axis within the ‘fvar’ table.

source

pub fn filter_range_min_value(&self) -> F2Dot14

Minimum value of the font variation instances that satisfy this condition.

source

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>

source

pub fn version(&self) -> MajorMinor

Major & minor version of the table: (1, 0)

source

pub fn substitution_count(&self) -> u16

Number of feature table substitution records.

source

pub fn substitutions(&self) -> &'a [FeatureTableSubstitutionRecord]

Array of feature table substitution records.

source§

impl<'a> TableRef<'a, SizeParamsMarker>

source

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.

source

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.

source

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.

source

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.

source

pub fn range_end(&self) -> u16

source§

impl<'a> TableRef<'a, StylisticSetParamsMarker>

source

pub fn version(&self) -> u16

source

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>

source

pub fn format(&self) -> u16

Format number is set to 0.

source

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.)

source

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.)

source

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.)

source

pub fn num_named_parameters(&self) -> u16

Number of named parameters. (May be zero.)

source

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.)

source

pub fn char_count(&self) -> u16

The count of characters for which this feature provides glyph variants. (May be zero.)

source

pub fn character(&self) -> &'a [BigEndian<Uint24>]

The Unicode Scalar Value of the characters for which this feature provides glyph variants.

source§

impl<'a, T: FontRead<'a>> TableRef<'a, LookupMarker<T>>

source

pub fn get_subtable(&self, offset: Offset16) -> Result<T, ReadError>

source§

impl TableRef<'_, CoverageFormat1Marker>

source

pub fn get(&self, gid: GlyphId) -> Option<u16>

If this glyph is in the coverage table, returns its index

source§

impl TableRef<'_, CoverageFormat2Marker>

source

pub fn get(&self, gid: GlyphId) -> Option<u16>

If this glyph is in the coverage table, returns its index

source§

impl<'a> TableRef<'a, ClassDefFormat1Marker>

source

pub fn get(&self, gid: GlyphId) -> u16

Get the class for this glyph id

source

pub fn iter(&self) -> impl Iterator<Item = (GlyphId, u16)> + 'a

Iterate over each glyph and its class.

source§

impl<'a> TableRef<'a, ClassDefFormat2Marker>

source

pub fn get(&self, gid: GlyphId) -> u16

Get the class for this glyph id

source

pub fn iter(&self) -> impl Iterator<Item = (GlyphId, u16)> + 'a

Iterate over each glyph and its class.

source§

impl<'a> TableRef<'a, DeviceMarker>

source

pub fn iter(&self) -> impl Iterator<Item = i8> + 'a

Iterate over the decoded values for this device

source§

impl<'a> TableRef<'a, MaxpMarker>

source

pub fn version(&self) -> Version16Dot16

The version: 0x00005000 for version 0.5, 0x00010000 for version 1.0.

source

pub fn num_glyphs(&self) -> u16

The number of glyphs in the font.

source

pub fn max_points(&self) -> Option<u16>

Maximum points in a non-composite glyph.

source

pub fn max_contours(&self) -> Option<u16>

Maximum contours in a non-composite glyph.

source

pub fn max_composite_points(&self) -> Option<u16>

Maximum points in a composite glyph.

source

pub fn max_composite_contours(&self) -> Option<u16>

Maximum contours in a composite glyph.

source

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.

source

pub fn max_twilight_points(&self) -> Option<u16>

Maximum points used in Z0.

source

pub fn max_storage(&self) -> Option<u16>

Number of Storage Area locations.

source

pub fn max_function_defs(&self) -> Option<u16>

Number of FDEFs, equal to the highest function number + 1.

source

pub fn max_instruction_defs(&self) -> Option<u16>

Number of IDEFs.

source

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).

source

pub fn max_size_of_instructions(&self) -> Option<u16>

Maximum byte count for glyph instructions.

source

pub fn max_component_elements(&self) -> Option<u16>

Maximum number of components referenced at “top level” for any composite glyph.

source

pub fn max_component_depth(&self) -> Option<u16>

Maximum levels of recursion; 1 for simple components.

source§

impl<'a> TableRef<'a, MvarMarker>

source

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.

source

pub fn value_record_size(&self) -> u16

The size in bytes of each value record — must be greater than zero.

source

pub fn value_record_count(&self) -> u16

The number of value records — may be zero.

source

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.

source

pub fn item_variation_store( &self ) -> Option<Result<ItemVariationStore<'a>, ReadError>>

Attempt to resolve item_variation_store_offset.

source

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, MvarMarker>

source

pub fn metric_delta( &self, tag: Tag, coords: &[F2Dot14] ) -> Result<Fixed, ReadError>

Returns the metric delta for the specified tag and normalized variation coordinates. Possible tags are found in the tags module.

source§

impl<'a> TableRef<'a, NameMarker>

source

pub fn version(&self) -> u16

Table version number (0 or 1)

source

pub fn count(&self) -> u16

Number of name records.

source

pub fn storage_offset(&self) -> u16

Offset to start of string storage (from start of table).

source

pub fn name_record(&self) -> &'a [NameRecord]

The name records where count is the number of records.

source

pub fn lang_tag_count(&self) -> Option<u16>

Number of language-tag records.

source

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>

source

pub fn string_data(&self) -> FontData<'a>

The FontData containing the encoded name strings.

source§

impl<'a> TableRef<'a, Os2Marker>

source

pub fn version(&self) -> u16

source

pub fn x_avg_char_width(&self) -> i16

Average weighted escapement.

The Average Character Width parameter specifies the arithmetic average of the escapement (width) of all non-zero width glyphs in the font.

source

pub fn us_weight_class(&self) -> u16

Weight class.

Indicates the visual weight (degree of blackness or thickness of strokes) of the characters in the font. Values from 1 to 1000 are valid.

source

pub fn us_width_class(&self) -> u16

Width class.

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.

source

pub fn fs_type(&self) -> u16

Type flags.

Indicates font embedding licensing rights for the font.

source

pub fn y_subscript_x_size(&self) -> i16

The recommended horizontal size in font design units for subscripts for this font.

source

pub fn y_subscript_y_size(&self) -> i16

The recommended vertical size in font design units for subscripts for this font.

source

pub fn y_subscript_x_offset(&self) -> i16

The recommended horizontal offset in font design units for subscripts for this font.

source

pub fn y_subscript_y_offset(&self) -> i16

The recommended vertical offset in font design units for subscripts for this font.

source

pub fn y_superscript_x_size(&self) -> i16

The recommended horizontal size in font design units for superscripts for this font.

source

pub fn y_superscript_y_size(&self) -> i16

The recommended vertical size in font design units for superscripts for this font.

source

pub fn y_superscript_x_offset(&self) -> i16

The recommended horizontal offset in font design units for superscripts for this font.

source

pub fn y_superscript_y_offset(&self) -> i16

The recommended vertical offset in font design units for superscripts for this font.

source

pub fn y_strikeout_size(&self) -> i16

Thickness of the strikeout stroke in font design units.

source

pub fn y_strikeout_position(&self) -> i16

The position of the top of the strikeout stroke relative to the baseline in font design units.

source

pub fn s_family_class(&self) -> i16

Font-family class and subclass. This parameter is a classification of font-family design.

source

pub fn panose_10(&self) -> &'a [u8]

PANOSE classification number.

Additional specifications are required for PANOSE to classify non-Latin character sets.

source

pub fn ul_unicode_range_1(&self) -> u32

Unicode Character Range.

Unicode Character Range (bits 0-31).

source

pub fn ul_unicode_range_2(&self) -> u32

Unicode Character Range (bits 32-63).

source

pub fn ul_unicode_range_3(&self) -> u32

Unicode Character Range (bits 64-95).

source

pub fn ul_unicode_range_4(&self) -> u32

Unicode Character Range (bits 96-127).

source

pub fn ach_vend_id(&self) -> Tag

Font Vendor Identification.

The four-character identifier for the vendor of the given type face.

source

pub fn fs_selection(&self) -> SelectionFlags

Font selection flags.

Contains information concerning the nature of the font patterns.

source

pub fn us_first_char_index(&self) -> u16

The minimum Unicode index (character code) in this font.

source

pub fn us_last_char_index(&self) -> u16

The maximum Unicode index (character code) in this font.

source

pub fn s_typo_ascender(&self) -> i16

The typographic ascender for this font.

source

pub fn s_typo_descender(&self) -> i16

The typographic descender for this font.

source

pub fn s_typo_line_gap(&self) -> i16

The typographic line gap for this font.

source

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.

source

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.

source

pub fn ul_code_page_range_1(&self) -> Option<u32>

Code page character range bits 0-31.

source

pub fn ul_code_page_range_2(&self) -> Option<u32>

Code page character range bits 32-63.

source

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.

source

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.

source

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.

source

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.

source

pub fn us_max_context(&self) -> Option<u16>

This field is used for fonts with multiple optical styles.

source

pub fn us_lower_optical_point_size(&self) -> Option<u16>

This field is used for fonts with multiple optical styles.

source

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>

source

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

source

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).

source

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.

source

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.

source

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).

source

pub fn min_mem_type42(&self) -> u32

Minimum memory usage when an OpenType font is downloaded.

source

pub fn max_mem_type42(&self) -> u32

Maximum memory usage when an OpenType font is downloaded.

source

pub fn min_mem_type1(&self) -> u32

Minimum memory usage when an OpenType font is downloaded as a Type 1 font.

source

pub fn max_mem_type1(&self) -> u32

Maximum memory usage when an OpenType font is downloaded as a Type 1 font.

source

pub fn num_glyphs(&self) -> Option<u16>

Number of glyphs (this should be the same as numGlyphs in ‘maxp’ table).

source

pub fn glyph_name_index(&self) -> Option<&'a [BigEndian<u16>]>

Array of indices into the string data. See below for details.

source

pub fn string_data(&self) -> Option<VarLenArray<'a, PString<'a>>>

Storage for the string data.

source§

impl<'a> TableRef<'a, PostMarker>

source

pub fn num_names(&self) -> usize

The number of glyph names covered by this table

source

pub fn glyph_name(&self, glyph_id: GlyphId) -> Option<&str>

source§

impl<'a> TableRef<'a, Index1Marker>

source

pub fn size_in_bytes(&self) -> Result<usize, ReadError>

Returns the total size in bytes of the index table.

source

pub fn get_offset(&self, index: usize) -> Result<usize, Error>

Returns the offset of the object at the given index.

source

pub fn get(&self, index: usize) -> Result<&'a [u8], Error>

Returns the data for the object at the given index.

source§

impl<'a> TableRef<'a, Index2Marker>

source

pub fn size_in_bytes(&self) -> Result<usize, ReadError>

Returns the total size in bytes of the index table.

source

pub fn get_offset(&self, index: usize) -> Result<usize, Error>

Returns the offset of the object at the given index.

source

pub fn get(&self, index: usize) -> Result<&'a [u8], Error>

Returns the data for the object at the given index.

source§

impl<'a> TableRef<'a, Index1Marker>

source

pub fn count(&self) -> u16

Number of objects stored in INDEX.

source

pub fn off_size(&self) -> u8

Object array element size.

source

pub fn offsets(&self) -> &'a [u8]

Bytes containing count + 1 offsets each of off_size.

source

pub fn data(&self) -> &'a [u8]

Array containing the object data.

source§

impl<'a> TableRef<'a, Index2Marker>

source

pub fn count(&self) -> u32

Number of objects stored in INDEX.

source

pub fn off_size(&self) -> u8

Object array element size.

source

pub fn offsets(&self) -> &'a [u8]

Bytes containing count + 1 offsets each of off_size.

source

pub fn data(&self) -> &'a [u8]

Array containing the object data.

source§

impl<'a> TableRef<'a, FdSelectFormat0Marker>

source

pub fn format(&self) -> u8

Format = 0.

source

pub fn fds(&self) -> &'a [u8]

FD selector array (one entry for each glyph).

source§

impl<'a> TableRef<'a, FdSelectFormat3Marker>

source

pub fn format(&self) -> u8

Format = 3.

source

pub fn n_ranges(&self) -> u16

Number of ranges.

source

pub fn ranges(&self) -> &'a [FdSelectRange3]

Range3 array.

source

pub fn sentinel(&self) -> u16

Sentinel GID. Set equal to the number of glyphs in the font.

source§

impl<'a> TableRef<'a, FdSelectFormat4Marker>

source

pub fn format(&self) -> u8

Format = 4.

source

pub fn n_ranges(&self) -> u32

Number of ranges.

source

pub fn ranges(&self) -> &'a [FdSelectRange4]

Range4 array.

source

pub fn sentinel(&self) -> u32

Sentinel GID. Set equal to the number of glyphs in the font.

source§

impl<'a> TableRef<'a, SbixMarker>

source

pub fn read(data: FontData<'a>, num_glyphs: u16) -> 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, SbixMarker>

source

pub fn version(&self) -> u16

Table version number — set to 1.

source

pub fn flags(&self) -> HeaderFlags

Bit 0: Set to 1. Bit 1: Draw outlines. Bits 2 to 15: reserved (set to 0).

source

pub fn num_strikes(&self) -> u32

Number of bitmap strikes.

source

pub fn strike_offsets(&self) -> &'a [BigEndian<Offset32>]

Offsets from the beginning of the ‘sbix’ table to data for each individual bitmap strike.

source

pub fn strikes(&self) -> ArrayOfOffsets<'a, Strike<'a>, Offset32>

A dynamically resolving wrapper for strike_offsets.

source§

impl<'a> TableRef<'a, StrikeMarker>

source

pub fn read(data: FontData<'a>, num_glyphs: u16) -> 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, StrikeMarker>

source

pub fn ppem(&self) -> u16

The PPEM size for which this strike was designed.

source

pub fn ppi(&self) -> u16

The device pixel density (in PPI) for which this strike was designed. (E.g., 96 PPI, 192 PPI.)

source

pub fn glyph_data_offsets(&self) -> &'a [BigEndian<u32>]

Offset from the beginning of the strike data header to bitmap data for an individual glyph ID.

source§

impl<'a> TableRef<'a, GlyphDataMarker>

source

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.

source

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.

source

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

pub fn data(&self) -> &'a [u8]

The actual embedded graphic data. The total length is inferred from sequential entries in the glyphDataOffsets array and the fixed size (8 bytes) of the preceding fields.

source§

impl<'a> TableRef<'a, StrikeMarker>

source

pub fn glyph_data( &self, glyph_id: GlyphId ) -> Result<Option<GlyphData<'a>>, ReadError>

source§

impl<'a> TableRef<'a, StatMarker>

source

pub fn version(&self) -> MajorMinor

Major/minor version number. Set to 1.2 for new fonts.

source

pub fn design_axis_size(&self) -> u16

The size in bytes of each axis record.

source

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.

source

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.

source

pub fn design_axes(&self) -> Result<&'a [AxisRecord], ReadError>

Attempt to resolve design_axes_offset.

source

pub fn axis_value_count(&self) -> u16

The number of axis value tables.

source

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.

source

pub fn offset_to_axis_values( &self ) -> Option<Result<AxisValueArray<'a>, ReadError>>

Attempt to resolve offset_to_axis_value_offsets.

source

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>

source

pub fn read( data: FontData<'a>, axis_value_count: u16 ) -> 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, AxisValueArrayMarker>

source

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.

source

pub fn axis_values(&self) -> ArrayOfOffsets<'a, AxisValue<'a>, Offset16>

A dynamically resolving wrapper for axis_value_offsets.

source§

impl<'a> TableRef<'a, AxisValueFormat1Marker>

source

pub fn format(&self) -> u16

Format identifier — set to 1.

source

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.

source

pub fn flags(&self) -> AxisValueTableFlags

Flags — see below for details.

source

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

pub fn value(&self) -> Fixed

A numeric value for this attribute value.

source§

impl<'a> TableRef<'a, AxisValueFormat2Marker>

source

pub fn format(&self) -> u16

Format identifier — set to 2.

source

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.

source

pub fn flags(&self) -> AxisValueTableFlags

Flags — see below for details.

source

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

pub fn nominal_value(&self) -> Fixed

A nominal numeric value for this attribute value.

source

pub fn range_min_value(&self) -> Fixed

The minimum value for a range associated with the specified name ID.

source

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>

source

pub fn format(&self) -> u16

Format identifier — set to 3.

source

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.

source

pub fn flags(&self) -> AxisValueTableFlags

Flags — see below for details.

source

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

pub fn value(&self) -> Fixed

A numeric value for this attribute value.

source

pub fn linked_value(&self) -> Fixed

The numeric value for a style-linked mapping from this value.

source§

impl<'a> TableRef<'a, AxisValueFormat4Marker>

source

pub fn format(&self) -> u16

Format identifier — set to 4.

source

pub fn axis_count(&self) -> u16

The total number of axes contributing to this axis-values combination.

source

pub fn flags(&self) -> AxisValueTableFlags

Flags — see below for details.

source

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.

source

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>

source

pub fn read(data: FontData<'a>, axis_count: u16) -> 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, TupleVariationHeaderMarker>

source

pub fn variation_data_size(&self) -> u16

The size in bytes of the serialized data for this tuple variation table.

source

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>

source

pub fn format(&self) -> u8

DeltaSetIndexMap format: set to 0.

source

pub fn entry_format(&self) -> EntryFormat

A packed field that describes the compressed representation of delta-set indices. See details below.

source

pub fn map_count(&self) -> u16

The number of mapping entries.

source

pub fn map_data(&self) -> &'a [u8]

The delta-set index mapping data. See details below.

source§

impl<'a> TableRef<'a, DeltaSetIndexMapFormat1Marker>

source

pub fn format(&self) -> u8

DeltaSetIndexMap format: set to 1.

source

pub fn entry_format(&self) -> EntryFormat

A packed field that describes the compressed representation of delta-set indices. See details below.

source

pub fn map_count(&self) -> u32

The number of mapping entries.

source

pub fn map_data(&self) -> &'a [u8]

The delta-set index mapping data. See details below.

source§

impl<'a> TableRef<'a, VariationRegionListMarker>

source

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.

source

pub fn region_count(&self) -> u16

The number of variation region tables in the variation region list. Must be less than 32,768.

source

pub fn variation_regions(&self) -> ComputedArray<'a, VariationRegion<'a>>

Array of variation regions.

source§

impl<'a> TableRef<'a, ItemVariationStoreMarker>

source

pub fn format(&self) -> u16

Format— set to 1

source

pub fn variation_region_list_offset(&self) -> Offset32

Offset in bytes from the start of the item variation store to the variation region list.

source

pub fn variation_region_list( &self ) -> Result<VariationRegionList<'a>, ReadError>

Attempt to resolve variation_region_list_offset.

source

pub fn item_variation_data_count(&self) -> u16

The number of item variation data subtables.

source

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.

source

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>

source

pub fn item_count(&self) -> u16

The number of delta sets for distinct items.

source

pub fn word_delta_count(&self) -> u16

A packed field: the high bit is a flag—see details below.

source

pub fn region_index_count(&self) -> u16

The number of variation regions referenced.

source

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.

source

pub fn delta_sets(&self) -> &'a [u8]

Delta-set rows.

source§

impl<'a> TableRef<'a, TupleVariationHeaderMarker>

source

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.

source

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.

source

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>

source

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.

source

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, ItemVariationDataMarker>

source

pub fn delta_set( &self, inner_index: u16 ) -> impl Iterator<Item = i32> + 'a + Clone

Returns an iterator over the per-region delta values for the specified inner index.

source§

impl<'a> TableRef<'a, VheaMarker>

source

pub fn version(&self) -> Version16Dot16

The major/minor version (1, 1)

source

pub fn ascender(&self) -> FWord

Typographic ascent.

source

pub fn descender(&self) -> FWord

Typographic descent.

source

pub fn line_gap(&self) -> FWord

Typographic line gap. Negative LineGap values are treated as zero in some legacy platform implementations.

source

pub fn advance_height_max(&self) -> UfWord

Maximum advance height value in ‘vmtx’ table.

source

pub fn min_top_side_bearing(&self) -> FWord

Minimum top sidebearing value in ‘vmtx’ table for glyphs with contours (empty glyphs should be ignored).

source

pub fn min_bottom_side_bearing(&self) -> FWord

Minimum bottom sidebearing value

source

pub fn y_max_extent(&self) -> FWord

Defined as max( tsb + (yMax-yMin)).

source

pub fn caret_slope_rise(&self) -> i16

Used to calculate the slope of the cursor (rise/run); 1 for vertical caret, 0 for horizontal.

source

pub fn caret_slope_run(&self) -> i16

0 for vertical caret, 1 for horizontal.

source

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

source

pub fn metric_data_format(&self) -> i16

0 for current format.

source

pub fn number_of_long_ver_metrics(&self) -> u16

Number of LongMetric entries in ‘hmtx’/‘vmtx’ table

source§

impl<'a> TableRef<'a, VmtxMarker>

source

pub fn read( data: FontData<'a>, number_of_long_ver_metrics: u16, num_glyphs: u16 ) -> 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, VmtxMarker>

source

pub fn v_metrics(&self) -> &'a [LongMetric]

Paired advance height and top side bearing values for each glyph. Records are indexed by glyph ID.

source

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, VmtxMarker>

source

pub fn advance(&self, glyph_id: GlyphId) -> Option<u16>

Returns the advance height for the given glyph identifier.

source

pub fn side_bearing(&self, glyph_id: GlyphId) -> Option<i16>

Returns the top side bearing for the given glyph identifer.

source§

impl<'a> TableRef<'a, VvarMarker>

source

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.

source

pub fn item_variation_store_offset(&self) -> Offset32

Offset in bytes from the start of this table to the item variation store table.

source

pub fn item_variation_store(&self) -> Result<ItemVariationStore<'a>, ReadError>

Attempt to resolve item_variation_store_offset.

source

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).

source

pub fn advance_height_mapping( &self ) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve advance_height_mapping_offset.

source

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).

source

pub fn tsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve tsb_mapping_offset.

source

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).

source

pub fn bsb_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve bsb_mapping_offset.

source

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).

source

pub fn v_org_mapping(&self) -> Option<Result<DeltaSetIndexMap<'a>, ReadError>>

Attempt to resolve v_org_mapping_offset.

source§

impl<'a> TableRef<'a, VvarMarker>

source

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.

source

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

pub fn bsb_delta( &self, glyph_id: GlyphId, coords: &[F2Dot14] ) -> Result<Fixed, ReadError>

Returns the bottom side bearing delta for the specified glyph identifier and normalized variation coordinates.

source

pub fn v_org_delta( &self, glyph_id: GlyphId, coords: &[F2Dot14] ) -> Result<Fixed, ReadError>

Returns the vertical origin delta for the specified glyph identifier and normalized variation coordinates.

source§

impl<'a> TableRef<'a, TableDirectoryMarker>

source

pub fn sfnt_version(&self) -> u32

0x00010000 or 0x4F54544F

source

pub fn num_tables(&self) -> u16

Number of tables.

source

pub fn search_range(&self) -> u16

source

pub fn entry_selector(&self) -> u16

source

pub fn range_shift(&self) -> u16

source

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>

source

pub fn ttc_tag(&self) -> Tag

Font Collection ID string: "ttcf"

source

pub fn version(&self) -> MajorMinor

Major/minor version of the TTC Header

source

pub fn num_fonts(&self) -> u32

Number of fonts in TTC

source

pub fn table_directory_offsets(&self) -> &'a [BigEndian<u32>]

Array of offsets to the TableDirectory for each font from the beginning of the file

source

pub fn dsig_tag(&self) -> Option<u32>

Tag indicating that a DSIG table exists, 0x44534947 (‘DSIG’) (null if no signature)

source

pub fn dsig_length(&self) -> Option<u32>

The length (in bytes) of the DSIG table (null if no signature)

source

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)

Trait Implementations§

source§

impl<'a, T: Clone> Clone for TableRef<'a, T>

source§

fn clone(&self) -> TableRef<'a, T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<'a, T> Freeze for TableRef<'a, T>
where T: Freeze,

§

impl<'a, T> RefUnwindSafe for TableRef<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for TableRef<'a, T>
where T: Send,

§

impl<'a, T> Sync for TableRef<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for TableRef<'a, T>
where T: Unpin,

§

impl<'a, T> UnwindSafe for TableRef<'a, T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<'a, T> FontReadWithArgs<'a> for T
where T: FontRead<'a>,

source§

fn read_with_args( data: FontData<'a>, _: &<T as ReadArgs>::Args ) -> Result<T, ReadError>

read an item, using the provided args. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<'a, T> ReadArgs for T
where T: FontRead<'a>,

§

type Args = ()

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.