public static CoverageTable[] CreateMultipleCoverageTables(long initPos, ushort[] offsets, BinaryReader reader) { CoverageTable[] results = new CoverageTable[offsets.Length]; for (int i = 0; i < results.Length; ++i) { results[i] = CoverageTable.CreateFrom(reader, initPos + offsets[i]); } return(results); }
public static CoverageTable[] CreateMultipleCoverageTables(long initPos, ushort[] offsets, BinaryReader reader) { List <CoverageTable> results = new List <CoverageTable>(offsets.Length); foreach (ushort offset in offsets) { results.Add(CoverageTable.CreateFrom(reader, initPos + offset)); } return(results.ToArray()); }
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); }