public Dictionary <ushort, ushort> GetMarkAttachClassIds(GlyphTypeface typeface) { dynamic header = this.GetFontTableHeader(); dynamic fontTable = this.GetFontTable(typeface); if (!fontTable.IsPresent) { return(new Dictionary <ushort, ushort>()); } dynamic classDef = new AccessPrivateWrapper(header.GetMarkAttachClassDef(fontTable.Wrapped)); if (classDef.IsInvalid) { return(new Dictionary <ushort, ushort>()); } return(Enumerable.Range(0, ushort.MaxValue) .ToDictionary( glyphId => (ushort)glyphId, glyphId => (ushort)classDef.GetClass(fontTable.Wrapped, (ushort)glyphId))); }