Struct read_fonts::TableRef

source ·
pub struct TableRef<'a, T> { /* private fields */ }
Expand description

Typed access to raw table data.

Implementations§

Resolve the provided offset from the start of this table.

Return a reference to this table’s raw data.

We use this in the compile crate to resolve offsets.

Major version number of the axis variations table — set to 1. Minor version number of the axis variations table — set to 0.

The number of variation axes for this font. This must be the same number as axisCount in the ‘fvar’ table.

The segment maps array — one segment map for each axis, in the order of axes specified in the ‘fvar’ table.

Table version number (0).

Number of encoding tables that follow.

Format number is set to 0.

This is the length in bytes of the subtable.

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

An array that maps character codes to glyph index values.

Format number is set to 2.

This is the length in bytes of the subtable.

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

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

Format number is set to 4.

This is the length in bytes of the subtable.

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

2 × segCount.

Maximum power of 2 less than or equal to segCount, times 2 ((2floor(log2(segCount))) * 2, where “” is an exponentiation operator)

Log2 of the maximum power of 2 less than or equal to numTables (log2(searchRange/2), which is equal to floor(log2(segCount)))

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

End characterCode for each segment, last=0xFFFF.

Start character code for each segment.

Delta for all character codes in segment.

Offsets into glyphIdArray or 0

Glyph index array (arbitrary length)

Format number is set to 6.

This is the length in bytes of the subtable.

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

First character code of subrange.

Number of character codes in subrange.

Array of glyph index values for character codes in the range.

Subtable format; set to 8.

Byte length of this subtable (including the header)

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

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

Number of groupings which follow

Array of SequentialMapGroup records.

Subtable format; set to 10.

Byte length of this subtable (including the header)

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

First character code covered

Number of character codes covered

Array of glyph indices for the character codes covered

Subtable format; set to 12.

Byte length of this subtable (including the header)

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

Number of groupings which follow

Array of SequentialMapGroup records.

Subtable format; set to 13.

Byte length of this subtable (including the header)

For requirements on use of the language field, see “Use of the language field in ‘cmap’ subtables” in this document.

Number of groupings which follow

Array of ConstantMapGroup records.

Subtable format. Set to 14.

Byte length of this subtable (including this header)

Number of variation Selector Records

Array of VariationSelector records.

Number of Unicode character ranges.

Array of UnicodeRange records.

Maps a codepoint to a nominal glyph identifier using the first available subtable that provides a valid mapping.

Maps a codepoint to a nominal glyph identifier.

Maps a codepoint to a nominal glyph identifier.

Table version number - set to 0 or 1.

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

Offset to baseGlyphRecords array (may be NULL).

Attempt to resolve base_glyph_records_offset.

Offset to layerRecords array (may be NULL).

Attempt to resolve layer_records_offset.

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

Offset to BaseGlyphList table.

Attempt to resolve base_glyph_list_offset.

Offset to LayerList table (may be NULL).

Attempt to resolve layer_list_offset.

Offset to ClipList table (may be NULL).

Attempt to resolve clip_list_offset.

Offset to DeltaSetIndexMap table (may be NULL).

Attempt to resolve var_index_map_offset.

Offset to ItemVariationStore (may be NULL).

Attempt to resolve item_variation_store_offset.

Offsets to Paint tables.

Attempt to resolve paint_offsets.

Set to 1.

Number of Clip records.

Clip records. Sorted by startGlyphID.

Set to 1.

Minimum x of clip box.

Minimum y of clip box.

Maximum x of clip box.

Maximum y of clip box.

Set to 2.

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

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

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

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

Base index into DeltaSetIndexMap.

An Extend enum value.

Number of ColorStop records.

An Extend enum value.

Number of ColorStop records.

Allows for variations.

Set to 1.

Number of offsets to paint tables to read from LayerList.

Index (base 0) into the LayerList.

Set to 2.

Index for a CPAL palette entry.

Alpha value.

Set to 3.

Index for a CPAL palette entry.

Alpha value. For variation, use varIndexBase + 0.

Base index into DeltaSetIndexMap.

Set to 4.

Offset to ColorLine table.

Attempt to resolve color_line_offset.

Start point (p₀) x coordinate.

Start point (p₀) y coordinate.

End point (p₁) x coordinate.

End point (p₁) y coordinate.

Rotation point (p₂) x coordinate.

Rotation point (p₂) y coordinate.

Set to 5.

Offset to VarColorLine table.

Attempt to resolve color_line_offset.

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

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

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

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

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

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

Base index into DeltaSetIndexMap.

Set to 6.

Offset to ColorLine table.

Attempt to resolve color_line_offset.

Start circle center x coordinate.

Start circle center y coordinate.

Start circle radius.

End circle center x coordinate.

End circle center y coordinate.

End circle radius.

Set to 7.

Offset to VarColorLine table.

Attempt to resolve color_line_offset.

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

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

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

End circle center x coordinate. For variation, use varIndexBase

End circle center y coordinate. For variation, use varIndexBase

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

Base index into DeltaSetIndexMap.

Set to 8.

Offset to ColorLine table.

Attempt to resolve color_line_offset.

Center x coordinate.

Center y coordinate.

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

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

Set to 9.

Offset to VarColorLine table.

Attempt to resolve color_line_offset.

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

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

Start of the angular range of the gradient, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 2.

End of the angular range of the gradient, 180° in counter-clockwise degrees per 1.0 of value. For variation, use varIndexBase + 3.

Base index into DeltaSetIndexMap.

Set to 10.

Offset to a Paint table.

Attempt to resolve paint_offset.

Glyph ID for the source outline.

Set to 11.

Glyph ID for a BaseGlyphList base glyph.

Set to 12.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Offset to an Affine2x3 table.

Attempt to resolve transform_offset.

Set to 13.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Offset to a VarAffine2x3 table.

Attempt to resolve transform_offset.

x-component of transformed x-basis vector.

y-component of transformed x-basis vector.

x-component of transformed y-basis vector.

y-component of transformed y-basis vector.

Translation in x direction.

Translation in y direction.

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

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

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

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

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

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

Base index into DeltaSetIndexMap.

Set to 14.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Translation in x direction.

Translation in y direction.

Set to 15.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

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

Base index into DeltaSetIndexMap.

Set to 16.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Scale factor in x direction.

Scale factor in y direction.

Set to 17.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

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

Base index into DeltaSetIndexMap.

Set to 18.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Scale factor in x direction.

Scale factor in y direction.

x coordinate for the center of scaling.

y coordinate for the center of scaling.

Set to 19.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

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

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

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

Base index into DeltaSetIndexMap.

Set to 20.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Scale factor in x and y directions.

Set to 21.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

Base index into DeltaSetIndexMap.

Set to 22.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Scale factor in x and y directions.

x coordinate for the center of scaling.

y coordinate for the center of scaling.

Set to 23.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

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

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

Base index into DeltaSetIndexMap.

Set to 24.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

Set to 25.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

Base index into DeltaSetIndexMap.

Set to 26.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

x coordinate for the center of rotation.

y coordinate for the center of rotation.

Set to 27.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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

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

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

Base index into DeltaSetIndexMap.

Set to 28.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Angle of skew in the direction of the x-axis, 180° in counter-clockwise degrees per 1.0 of value.

Angle of skew in the direction of the y-axis, 180° in counter-clockwise degrees per 1.0 of value.

Set to 29.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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.

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.

Base index into DeltaSetIndexMap.

Set to 30.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

Angle of skew in the direction of the x-axis, 180° in counter-clockwise degrees per 1.0 of value.

Angle of skew in the direction of the y-axis, 180° in counter-clockwise degrees per 1.0 of value.

x coordinate for the center of rotation.

y coordinate for the center of rotation.

Set to 31.

Offset to a Paint subtable.

Attempt to resolve paint_offset.

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.

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.

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

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

Base index into DeltaSetIndexMap.

Set to 32.

Offset to a source Paint table.

Attempt to resolve source_paint_offset.

A CompositeMode enumeration value.

Offset to a backdrop Paint table.

Attempt to resolve backdrop_paint_offset.

Table version number (=0).

Number of palette entries in each palette.

Number of palettes in the table.

Total number of color records, combined for all palettes.

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

Attempt to resolve color_records_array_offset.

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

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.

Attempt to resolve palette_types_array_offset.

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.

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<u16>], ReadError>>

The major/minor version of the GDEF table

Offset to class definition table for glyph type, from beginning of GDEF header (may be NULL)

Attempt to resolve glyph_class_def_offset.

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

Attempt to resolve attach_list_offset.

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

Attempt to resolve lig_caret_list_offset.

Offset to class definition table for mark attachment type, from beginning of GDEF header (may be NULL)

Attempt to resolve mark_attach_class_def_offset.

Offset to the table of mark glyph set definitions, from beginning of GDEF header (may be NULL)

Attempt to resolve mark_glyph_sets_def_offset.

Offset to the Item Variation Store table, from beginning of GDEF header (may be NULL)

Attempt to resolve item_var_store_offset.

Offset to Coverage table - from beginning of AttachList table

Attempt to resolve coverage_offset.

Number of glyphs with attachment points

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

Attempt to resolve attach_point_offsets.

Number of attachment points on this glyph

Array of contour point indices -in increasing numerical order

Offset to Coverage table - from beginning of LigCaretList table

Attempt to resolve coverage_offset.

Number of ligature glyphs

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

Attempt to resolve lig_glyph_offsets.

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

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

Attempt to resolve caret_value_offsets.

Format identifier: format = 1

X or Y value, in design units

Format identifier: format = 2

Contour point index on glyph

Format identifier-format = 3

X or Y value, in design units

Offset to Device table (non-variable font) / Variation Index table (variable font) for X or Y value-from beginning of CaretValue table

Attempt to resolve device_offset.

Format identifier == 1

Number of mark glyph sets defined

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

Attempt to resolve coverage_offsets.

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.

Minimum x for coordinate data.

Minimum y for coordinate data.

Maximum x for coordinate data.

Maximum y for coordinate data.

Array of point indices for the last point of each contour, in increasing numeric order

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.

Array of instruction byte code for the glyph.

the raw data for flags & x/y coordinates

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.

Minimum x for coordinate data.

Minimum y for coordinate data.

Maximum x for coordinate data.

Maximum y for coordinate data.

component flag glyph index of component

Returns the total number of points.

Reads points and flags into the specified 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.

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.

Returns an iterator over the components of the composite glyph.

Returns the TrueType interpreter instructions.

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

Offset to ScriptList table, from beginning of GPOS table

Attempt to resolve script_list_offset.

Offset to FeatureList table, from beginning of GPOS table

Attempt to resolve feature_list_offset.

Offset to LookupList table, from beginning of GPOS table

Attempt to resolve lookup_list_offset.

Attempt to resolve feature_variations_offset.

Format identifier, = 1

Horizontal value, in design units

Vertical value, in design units

Format identifier, = 2

Horizontal value, in design units

Vertical value, in design units

Index to glyph contour point

Format identifier, = 3

Horizontal value, in design units

Vertical value, in design units

Offset to Device table (non-variable font) / VariationIndex table (variable font) for X coordinate, from beginning of Anchor table (may be NULL)

Attempt to resolve x_device_offset.

Offset to Device table (non-variable font) / VariationIndex table (variable font) for Y coordinate, from beginning of Anchor table (may be NULL)

Attempt to resolve y_device_offset.

Number of MarkRecords

Array of MarkRecords, ordered by corresponding glyphs in the associated mark Coverage table.

Format identifier: format = 1

Offset to Coverage table, from beginning of SinglePos subtable.

Attempt to resolve coverage_offset.

Defines the types of data in the ValueRecord.

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

Format identifier: format = 2

Offset to Coverage table, from beginning of SinglePos subtable.

Attempt to resolve coverage_offset.

Defines the types of data in the ValueRecords.

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

Array of ValueRecords — positioning values applied to glyphs.

Format identifier: format = 1

Offset to Coverage table, from beginning of PairPos subtable.

Attempt to resolve coverage_offset.

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

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

Number of PairSet tables

Array of offsets to PairSet tables. Offsets are from beginning of PairPos subtable, ordered by Coverage Index.

Attempt to resolve pair_set_offsets.

Number of PairValueRecords

Array of PairValueRecords, ordered by glyph ID of the second glyph.

Format identifier: format = 2

Offset to Coverage table, from beginning of PairPos subtable.

Attempt to resolve coverage_offset.

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

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

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

Attempt to resolve class_def1_offset.

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

Attempt to resolve class_def2_offset.

Number of classes in classDef1 table — includes Class 0.

Number of classes in classDef2 table — includes Class 0.

Array of Class1 records, ordered by classes in classDef1.

Format identifier: format = 1

Offset to Coverage table, from beginning of CursivePos subtable.

Attempt to resolve coverage_offset.

Number of EntryExit records

Array of EntryExit records, in Coverage index order.

Format identifier: format = 1

Offset to markCoverage table, from beginning of MarkBasePos subtable.

Attempt to resolve mark_coverage_offset.

Offset to baseCoverage table, from beginning of MarkBasePos subtable.

Attempt to resolve base_coverage_offset.

Number of classes defined for marks

Offset to MarkArray table, from beginning of MarkBasePos subtable.

Attempt to resolve mark_array_offset.

Offset to BaseArray table, from beginning of MarkBasePos subtable.

Attempt to resolve base_array_offset.

Number of BaseRecords

Array of BaseRecords, in order of baseCoverage Index.

Format identifier: format = 1

Offset to markCoverage table, from beginning of MarkLigPos subtable.

Attempt to resolve mark_coverage_offset.

Offset to ligatureCoverage table, from beginning of MarkLigPos subtable.

Attempt to resolve ligature_coverage_offset.

Number of defined mark classes

Offset to MarkArray table, from beginning of MarkLigPos subtable.

Attempt to resolve mark_array_offset.

Offset to LigatureArray table, from beginning of MarkLigPos subtable.

Attempt to resolve ligature_array_offset.

Number of LigatureAttach table offsets

Array of offsets to LigatureAttach tables. Offsets are from beginning of LigatureArray table, ordered by ligatureCoverage index.

Attempt to resolve ligature_attach_offsets.

Number of ComponentRecords in this ligature

Array of Component records, ordered in writing direction.

Format identifier: format = 1

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

Attempt to resolve mark1_coverage_offset.

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

Attempt to resolve mark2_coverage_offset.

Number of Combining Mark classes defined

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

Attempt to resolve mark1_array_offset.

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

Attempt to resolve mark2_array_offset.

Number of Mark2 records

Array of Mark2Records, in Coverage order.

Format identifier: format = 1

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

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

Attempt to resolve extension_offset.

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

Offset to ScriptList table, from beginning of GSUB table

Attempt to resolve script_list_offset.

Offset to FeatureList table, from beginning of GSUB table

Attempt to resolve feature_list_offset.

Offset to LookupList table, from beginning of GSUB table

Attempt to resolve lookup_list_offset.

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

Attempt to resolve feature_variations_offset.

Format identifier: format = 1

Offset to Coverage table, from beginning of substitution subtable

Attempt to resolve coverage_offset.

Add to original glyph ID to get substitute glyph ID

Format identifier: format = 2

Offset to Coverage table, from beginning of substitution subtable

Attempt to resolve coverage_offset.

Number of glyph IDs in the substituteGlyphIDs array

Array of substitute glyph IDs — ordered by Coverage index

Format identifier: format = 1

Offset to Coverage table, from beginning of substitution subtable

Attempt to resolve coverage_offset.

Number of Sequence table offsets in the sequenceOffsets array

Array of offsets to Sequence tables. Offsets are from beginning of substitution subtable, ordered by Coverage index

Attempt to resolve sequence_offsets.

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

String of glyph IDs to substitute

Format identifier: format = 1

Offset to Coverage table, from beginning of substitution subtable

Attempt to resolve coverage_offset.

Number of AlternateSet tables

Array of offsets to AlternateSet tables. Offsets are from beginning of substitution subtable, ordered by Coverage index

Attempt to resolve alternate_set_offsets.

Number of glyph IDs in the alternateGlyphIDs array

Array of alternate glyph IDs, in arbitrary order

Format identifier: format = 1

Offset to Coverage table, from beginning of substitution subtable

Attempt to resolve coverage_offset.

Number of LigatureSet tables

Array of offsets to LigatureSet tables. Offsets are from beginning of substitution subtable, ordered by Coverage index

Attempt to resolve ligature_set_offsets.

Number of Ligature tables

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

Attempt to resolve ligature_offsets.

glyph ID of ligature to substitute

Number of components in the ligature

Array of component glyph IDs — start with the second component, ordered in writing direction

Format identifier. Set to 1.

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

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

Attempt to resolve extension_offset.

Format identifier: format = 1

Offset to Coverage table, from beginning of substitution subtable.

Attempt to resolve coverage_offset.

Number of glyphs in the backtrack sequence.

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

Attempt to resolve backtrack_coverage_offsets.

Number of glyphs in lookahead sequence.

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

Attempt to resolve lookahead_coverage_offsets.

Number of glyph IDs in the substituteGlyphIDs array.

Array of substitute glyph IDs — ordered by Coverage index.

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

Set by font manufacturer.

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.

Set to 0x5F0F3CF5.

See the flags enum

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.

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

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

Minimum x coordinate across all glyph bounding boxes.

Minimum y coordinate across all glyph bounding boxes.

Maximum x coordinate across all glyph bounding boxes.

Maximum y coordinate across all glyph bounding boxes.

see somewhere else

Smallest readable size in pixels.

Deprecated (Set to 2).

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

0 for current format.

Major version number of the horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.

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

Attempt to resolve item_variation_store_offset.

Offset in bytes from the start of this table to the delta-set index mapping for advance widths (may be NULL).

Attempt to resolve advance_width_mapping_offset.

Offset in bytes from the start of this table to the delta-set index mapping for left side bearings (may be NULL).

Attempt to resolve lsb_mapping_offset.

Offset in bytes from the start of this table to the delta-set index mapping for right side bearings (may be NULL).

Attempt to resolve rsb_mapping_offset.

Returns the advance width delta for the specified glyph identifier and normalized variation coordinates.

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

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

The major/minor version (1, 0)

Typographic ascent.

Typographic descent.

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

Maximum advance width/height value in ‘hmtx’/‘vmtx’ table.

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

Minimum right/bottom sidebearing value; calculated as min(aw - (lsb + xMax - xMin)) for horizontal (empty glyphs should be ignored).

Horizontal: max(lsb + (xMax-xMin)); vertical: tsb + (yMax-yMin).

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

0 for vertical caret, 1 for horizontal.

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

0 for current format.

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

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

Leading (left/top) side bearings for glyph IDs greater than or equal to numberOfLongMetrics.

Number of ScriptRecords

Array of ScriptRecords, listed alphabetically by script tag

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

Attempt to resolve default_lang_sys_offset.

Number of LangSysRecords for this script — excluding the default LangSys

Array of LangSysRecords, listed alphabetically by LangSys tag

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

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

Array of indices into the FeatureList, in arbitrary order

Number of FeatureRecords in this table

Array of FeatureRecords — zero-based (first feature has FeatureIndex = 0), listed alphabetically by feature tag

Offset from start of Feature table to FeatureParams table, if defined for the feature and present, else NULL

Attempt to resolve feature_params_offset.

Number of LookupList indices for this feature

Array of indices into the LookupList — zero-based (first lookup is LookupListIndex = 0)

Number of lookups in this table

Array of offsets to Lookup tables, from beginning of LookupList — zero based (first lookup is Lookup index = 0)

Attempt to resolve lookup_offsets.

Different enumerations for GSUB and GPOS

Lookup qualifiers

Number of subtables for this lookup

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

Attempt to resolve subtable_offsets.

Index (base 0) into GDEF mark glyph sets structure. This field is only present if the USE_MARK_FILTERING_SET lookup flag is set.

Format identifier — format = 1

Number of glyphs in the glyph array

Array of glyph IDs — in numerical order

Format identifier — format = 2

Number of RangeRecords

Array of glyph ranges — ordered by startGlyphID.

Format identifier — format = 1

First glyph ID of the classValueArray

Size of the classValueArray

Array of Class Values — one per glyph ID

Format identifier — format = 2

Number of ClassRangeRecords

Array of ClassRangeRecords — ordered by startGlyphID

Format identifier: format = 1

Offset to Coverage table, from beginning of SequenceContextFormat1 table

Attempt to resolve coverage_offset.

Number of SequenceRuleSet tables

Array of offsets to SequenceRuleSet tables, from beginning of SequenceContextFormat1 table (offsets may be NULL)

Attempt to resolve seq_rule_set_offsets.

Number of SequenceRule tables

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

Attempt to resolve seq_rule_offsets.

Number of glyphs in the input glyph sequence

Number of SequenceLookupRecords

Array of input glyph IDs—starting with the second glyph

Array of Sequence lookup records

Format identifier: format = 2

Offset to Coverage table, from beginning of SequenceContextFormat2 table

Attempt to resolve coverage_offset.

Offset to ClassDef table, from beginning of SequenceContextFormat2 table

Attempt to resolve class_def_offset.

Number of ClassSequenceRuleSet tables

Array of offsets to ClassSequenceRuleSet tables, from beginning of SequenceContextFormat2 table (may be NULL)

Attempt to resolve class_seq_rule_set_offsets.

Number of ClassSequenceRule tables

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

Attempt to resolve class_seq_rule_offsets.

Number of glyphs to be matched

Number of SequenceLookupRecords

Sequence of classes to be matched to the input glyph sequence, beginning with the second glyph position

Array of SequenceLookupRecords

Format identifier: format = 3

Number of glyphs in the input sequence

Number of SequenceLookupRecords

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

Attempt to resolve coverage_offsets.

Array of SequenceLookupRecords

Format identifier: format = 1

Offset to Coverage table, from beginning of ChainSequenceContextFormat1 table

Attempt to resolve coverage_offset.

Number of ChainedSequenceRuleSet tables

Array of offsets to ChainedSeqRuleSet tables, from beginning of ChainedSequenceContextFormat1 table (may be NULL)

Attempt to resolve chained_seq_rule_set_offsets.

Number of ChainedSequenceRule tables

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

Attempt to resolve chained_seq_rule_offsets.

Number of glyphs in the backtrack sequence

Array of backtrack glyph IDs

Number of glyphs in the input sequence

Array of input glyph IDs—start with second glyph

Number of glyphs in the lookahead sequence

Array of lookahead glyph IDs

Number of SequenceLookupRecords

Array of SequenceLookupRecords

Format identifier: format = 2

Offset to Coverage table, from beginning of ChainedSequenceContextFormat2 table

Attempt to resolve coverage_offset.

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

Attempt to resolve backtrack_class_def_offset.

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

Attempt to resolve input_class_def_offset.

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

Attempt to resolve lookahead_class_def_offset.

Number of ChainedClassSequenceRuleSet tables

Array of offsets to ChainedClassSequenceRuleSet tables, from beginning of ChainedSequenceContextFormat2 table (may be NULL)

Number of ChainedClassSequenceRule tables

Array of offsets to ChainedClassSequenceRule tables, from beginning of ChainedClassSequenceRuleSet

Attempt to resolve chained_class_seq_rule_offsets.

Number of glyphs in the backtrack sequence

Array of backtrack-sequence classes

Total number of glyphs in the input sequence

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

Number of glyphs in the lookahead sequence

Array of lookahead-sequence classes

Number of SequenceLookupRecords

Array of SequenceLookupRecords

Format identifier: format = 3

Number of glyphs in the backtrack sequence

Array of offsets to coverage tables for the backtrack sequence

Attempt to resolve backtrack_coverage_offsets.

Number of glyphs in the input sequence

Array of offsets to coverage tables for the input sequence

Attempt to resolve input_coverage_offsets.

Number of glyphs in the lookahead sequence

Array of offsets to coverage tables for the lookahead sequence

Attempt to resolve lookahead_coverage_offsets.

Number of SequenceLookupRecords

Array of SequenceLookupRecords

Smallest size to correct, in ppem

Largest size to correct, in ppem

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

Array of compressed data

A delta-set outer index — used to select an item variation data subtable within the item variation store.

A delta-set inner index — used to select a delta-set row within an item variation data subtable.

Format, = 0x8000

Number of feature variation records.

Array of feature variation records.

Number of conditions for this condition set.

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

Attempt to resolve condition_offsets.

Format, = 1

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

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

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

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

Number of feature table substitution records.

Array of feature table substitution records.

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.

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.

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.

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.

Format number is set to 0.

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

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

The ‘name’ table name ID that specifies sample text that illustrates the effect of this feature. (May be NULL.)

Number of named parameters. (May be zero.)

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

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

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

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

The number of glyphs in the font.

Maximum points in a non-composite glyph.

Maximum contours in a non-composite glyph.

Maximum points in a composite glyph.

Maximum contours in a composite glyph.

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.

Maximum points used in Z0.

Number of Storage Area locations.

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

Number of IDEFs.

Maximum stack depth across Font Program (‘fpgm’ table), CVT Program (‘prep’ table) and all glyph instructions (in the ‘glyf’ table).

Maximum byte count for glyph instructions.

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

Maximum levels of recursion; 1 for simple components.

Major version number of the horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.

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

The number of value records — may be zero.

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.

Attempt to resolve item_variation_store_offset.

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.

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

Table version number (0 or 1)

Number of name records.

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

The name records where count is the number of records.

Number of language-tag records.

The language-tag records where langTagCount is the number of records.

The FontData containing the encoded name strings.

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

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

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.

Indicates font embedding licensing rights for the font.

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

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

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

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

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

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

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

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

Thickness of the strikeout stroke in font design units.

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

This parameter is a classification of font-family design.

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

Unicode Character Range (bits 0-31).

Unicode Character Range (bits 32-63).

Unicode Character Range (bits 64-95).

Unicode Character Range (bits 96-127).

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

Contains information concerning the nature of the font patterns.

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

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

The typographic ascender for this font.

The typographic descender for this font.

The typographic line gap for this font.

The “Windows ascender” metric. This should be used to specify the height above the baseline for a clipping region.

The “Windows descender” metric. This should be used to specify the vertical extend below the baseline for a clipping region.

Code page character range bits 0-31.

Code page character range bits 32-63.

This metric specifies the distance between the baseline and the approximate height of non-ascending lowercase letters measured in FUnits.

This metric specifies the distance between the baseline and the approximate height of uppercase letters measured in FUnits.

This is the Unicode code point, in UTF-16 encoding, of a character that can be used for a default glyph.

his is the Unicode code point, in UTF-16 encoding, of a character that can be used as a default break character.

This field is used for fonts with multiple optical styles.

This field is used for fonts with multiple optical styles.

This field is used for fonts with multiple optical styles.

0x00010000 for version 1.0 0x00020000 for version 2.0 0x00025000 for version 2.5 (deprecated) 0x00030000 for version 3.0

Italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).

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.

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.

Set to 0 if the font is proportionally spaced, non-zero if the font is not proportionally spaced (i.e. monospaced).

Minimum memory usage when an OpenType font is downloaded.

Maximum memory usage when an OpenType font is downloaded.

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

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

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

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

Storage for the string data.

The number of glyph names covered by this table

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

The size in bytes of each axis record.

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.

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.

Attempt to resolve design_axes_offset.

The number of axis value tables.

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.

Attempt to resolve offset_to_axis_value_offsets.

Name ID used as fallback when projection of names into a particular font model produces a subfamily name containing only elidable elements.

Array of offsets to axis value tables, in bytes from the start of the axis value offsets array.

Attempt to resolve axis_value_offsets.

Format identifier — set to 1.

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.

Flags — see below for details.

The name ID for entries in the ‘name’ table that provide a display string for this attribute value.

A numeric value for this attribute value.

Format identifier — set to 2.

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.

Flags — see below for details.

The name ID for entries in the ‘name’ table that provide a display string for this attribute value.

A nominal numeric value for this attribute value.

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

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

Format identifier — set to 3.

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.

Flags — see below for details.

The name ID for entries in the ‘name’ table that provide a display string for this attribute value.

A numeric value for this attribute value.

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

Format identifier — set to 4.

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

Flags — see below for details.

The name ID for entries in the ‘name’ table that provide a display string for this combination of axis values.

Array of AxisValue records that provide the combination of axis values, one for each contributing axis.

DeltaSetIndexMap format: set to 0.

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

The number of mapping entries.

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

DeltaSetIndexMap format: set to 1.

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

The number of mapping entries.

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

The number of variation axes for this font. This must be the same number as axisCount in the ‘fvar’ table.

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

Array of variation regions.

Format— set to 1

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

Attempt to resolve variation_region_list_offset.

The number of item variation data subtables.

Offsets in bytes from the start of the item variation store to each item variation data subtable.

Attempt to resolve item_variation_data_offsets.

The number of delta sets for distinct items.

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

The number of variation regions referenced.

Array of indices into the variation region list for the regions referenced by this item variation data table.

Delta-set rows.

Computes the delta value for the specified index and set of normalized variation coordinates.

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

Major version number of the horizontal metrics variations table — set to 1. Minor version number of the horizontal metrics variations table — set to 0.

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

Attempt to resolve item_variation_store_offset.

Offset in bytes from the start of this table to the delta-set index mapping for advance heights (may be NULL).

Attempt to resolve advance_height_mapping_offset.

Offset in bytes from the start of this table to the delta-set index mapping for top side bearings (may be NULL).

Attempt to resolve tsb_mapping_offset.

Offset in bytes from the start of this table to the delta-set index mapping for bottom side bearings (may be NULL).

Attempt to resolve bsb_mapping_offset.

Offset in bytes from the start of this table to the delta-set index mapping for Y coordinates of vertical origins (may be NULL).

Attempt to resolve v_org_mapping_offset.

Returns the advance height delta for the specified glyph identifier and normalized variation coordinates.

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

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

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

0x00010000 or 0x4F54544F

Number of tables.

Table records array—one for each top-level table in the font

Font Collection ID string: "ttcf"

Major/minor version of the TTC Header

Number of fonts in TTC

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

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

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

The offset (in bytes) of the DSIG table from the beginning of the TTC file (null if no signature)

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.