- const LigatureActionEntry *ap = (const LigatureActionEntry *) ((char *) &ligatureSubstitutionHeader->stHeader + ligActionOffset) + ligActionIndex;
- const TTGlyphID *ligatureTable = (const TTGlyphID *) ((char *) &ligatureSubstitutionHeader->stHeader + ligatureOffset);
+ LEReferenceTo<LigatureActionEntry> ap(stHeader, success, ligActionOffset); // byte offset
+ ap.addObject(ligActionIndex - 1, success); // index offset ( one before the actual start, because we will pre-increment)
+ LEReferenceToArrayOf<TTGlyphID> ligatureTable(stHeader, success, ligatureOffset, LE_UNBOUNDED_ARRAY);