Sir Erwin,
I have isolated the exact root cause of an OpenType export failure in FontCreator 16.0.0.3082 (64-bit) on a complex-script Arabic/Nastaleeq project.
Below are the technical findings, along with two specific architecture/UI requests regarding subtable auto-splitting limits, error messaging, and a bug in the storage optimizer.
1. Root Cause Breakdown
The export error TTableOptimizerBase Offset out of ofuint16 bounds (65540)! originates directly from MarkPositioning1 (mark) -> MarkToBase1, which contains 98,136 pairs distributed across 3 subtables:
-
Subtable 1: 21,855 pairs
-
Subtable 2: 47,235 pairs
-
Subtable 3: 29,046 pairs
(See attached screenshot: OpenType Designer MarkToBase1 Subtables.png)
The Technical Issue:
In the OpenType GPOS binary specification (MarkBasePosFormat1), internal offsets to AnchorTable and BaseRecord arrays are restricted to unsigned 16-bit integers (Offset16, maximum 65,535 bytes).
FontCreator attempted to pack 47,235 base-mark combinations into Subtable 2, causing the cumulative byte offset of the BaseArray / AnchorTable structures to reach 65,540 (exactly 5 bytes beyond the 16-bit ceiling).
2. The Optimizer Bug (Corrupted GPOS Compilation)
The error modal currently instructs the user:
“Do consider enabling Optimize storage of OpenType layout features from the Options dialog, and then try again.”
When this option is enabled under Tools → Options → Font:
-
The font compiles without throwing a modal error.
-
However, the compiled GPOS binary is corrupted.
-
In Adobe InDesign 2023:
-
With HarfBuzz enabled: Glyphs fail to resolve through lookups and drop to
.notdef(“NO GLYPH” boxes) despite glyphs being present and mapped in the font (see attachedInDesign Rendering Failure.png). -
With HarfBuzz disabled (Adobe World-Ready Composer): OpenType tables fail sanity checks outright, resulting in complete shaping failure / invisible text.
-
The storage optimizer’s compaction/deduplication routine appears to calculate invalid subtable offsets or corrupt the Coverage tables when compressing these large tables.
3. Feature & Usability Requests for Erwin / Development Team
Request A: Enforce Stricter Auto-Splitting Thresholds for GPOS Subtables
Because the OpenType binary specification strictly caps Offset16 at 65,535 bytes, a single subtable cannot hold unlimited pairs. FontCreator already divides lookups into subtables automatically, but its threshold allows individual subtables to balloon (in this case, 47,235 pairs in Subtable 2).
- Request: Could FontCreator adjust its auto-partitioning heuristic to split
MarkBasePos(and similar lookups) into smaller subtables dynamically before the cumulativeBaseArray+AnchorTablesize approaches ~60 KB, preventingofuint16overflows automatically?
Request B: Meaningful, Context-Aware Error Reporting
The current error message:
TTableOptimizerBase Offset out of ofuint16 bounds (65540)! Do consider enabling Optimize storage of OpenType layout features...
is ambiguous for end users because:
-
It does not identify which feature, lookup, or subtable triggered the overflow (e.g.,
GPOS 'mark' -> MarkToBase1 (Subtable 2)). -
It advises enabling an optimization setting that, in cases of extreme density, outputs a broken/corrupt binary rather than explaining that the subtable exceeds the physical 64 KB OpenType structural limit.
- Request: Please display the lookup name, table type (GPOS/GSUB), and subtable index in the error dialog, and recommend splitting the specific lookup into multiple smaller lookups rather than simply suggesting table optimization.
Attachments
-
Error_Dialog.png— Showing theTTableOptimizerBase Offset out of ofuint16 bounds (65540)modal. -
Options_Storage_Optimization.png— Showing the export settings used. -
OpenType_Designer_MarkToBase1.png— Showing the 3 subtables and Subtable 2 with 47,235 pairs. -
InDesign_Rendering_Failure.png— Showing.notdef/ broken shaping in InDesign 2023.
(I can provide the .fcp project file privately if needed for debugging the optimizer serialization routine.)





