public static LigGlyph CreateFrom(BinaryReader reader, long beginAt) { reader.BaseStream.Seek(beginAt, SeekOrigin.Begin); //---------- LigGlyph ligGlyph = new LigGlyph(); ushort caretCount = reader.ReadUInt16(); ligGlyph.caretValueOffsets = Utils.ReadUInt16Array(reader, caretCount); return(ligGlyph); }
public static LigCaretList CreateFrom(BinaryReader reader, long beginAt) { reader.BaseStream.Seek(beginAt, SeekOrigin.Begin); //---- LigCaretList ligcaretList = new LigCaretList(); ushort coverageOffset = reader.ReadUInt16(); ushort ligGlyphCount = reader.ReadUInt16(); ushort[] ligGlyphOffsets = Utils.ReadUInt16Array(reader, ligGlyphCount); LigGlyph[] ligGlyphs = new LigGlyph[ligGlyphCount]; for (int i = 0; i < ligGlyphCount; ++i) { ligGlyphs[i] = LigGlyph.CreateFrom(reader, beginAt + ligGlyphOffsets[i]); } ligcaretList.ligGlyphs = ligGlyphs; ligcaretList.coverageTable = CoverageTable.CreateFrom(reader, beginAt + coverageOffset); return(ligcaretList); }