MathGlyphInfo
in package
Parsed MathGlyphInfo sub-table from an OpenType MATH table.
Spec: https://learn.microsoft.com/en-us/typography/opentype/spec/math#mathglyphinfo-table
Holds per-glyph data the painter consults at layout time:
-
Italic-correction values: extra horizontal space to add after an italic-shaped glyph that an upright follower (subscripts, superscripts to the right of a slanted base) should bridge.
-
Top-accent attachment offsets: where a top accent (
<mover>over an<mi>x</mi>) should attach horizontally. -
Extended-shape coverage: glyph IDs that should be drawn with script-script vertical metrics even at script level (used by spec for very large operators / radical signs).
-
Math kern info: per-glyph corner kerning at the four sub/sup attachment points. Carried as raw bytes pending a dedicated parser in a follow-up slice - the structure is per-glyph CorrectionHeight + KernValue arrays at each corner.
Each map's keys are glyph IDs (GIDs), values are FUnit shifts.
Table of Contents
Properties
- $extendedShapes : array<string|int, mixed>
- $italicCorrections : array<string|int, mixed>
- $kernInfoBytes : string
- $topAccentAttachments : array<string|int, mixed>
Methods
- __construct() : mixed
Properties
$extendedShapes
public
array<string|int, mixed>
$extendedShapes
$italicCorrections
public
array<string|int, mixed>
$italicCorrections
$kernInfoBytes
public
string
$kernInfoBytes
$topAccentAttachments
public
array<string|int, mixed>
$topAccentAttachments
Methods
__construct()
public
__construct(array<int, int> $italicCorrections, array<int, int> $topAccentAttachments, array<int, true> $extendedShapes, string $kernInfoBytes) : mixed
Parameters
- $italicCorrections : array<int, int>
-
gid → FUnit italic correction.
- $topAccentAttachments : array<int, int>
-
gid → FUnit top-accent attachment offset.
- $extendedShapes : array<int, true>
-
gid set (only keys matter).
- $kernInfoBytes : string
-
Raw MathKernInfo sub-table bytes (parsed later).