public static HdmxTable Read(BinaryReaderFont reader) { return(new HdmxTable { version = reader.ReadUInt16(), numRecords = reader.ReadInt16(), sizeDeviceRecord = reader.ReadInt32() }); }
public void ReadOffset(BinaryReaderFont reader, int index, out int offset0, out int offset1) { if (index < 0 || index >= count - 1) { offset0 = 0; offset1 = 0; return; } switch (offSize) { case 1: reader.Position = position + index; offset0 = reader.ReadByte(); offset1 = reader.ReadByte(); return; case 2: reader.Position = position + index * 2; offset0 = reader.ReadUInt16(); offset1 = reader.ReadUInt16(); return; case 3: reader.Position = position + index * 3; offset0 = reader.ReadUInt24(); offset1 = reader.ReadUInt24(); return; case 4: reader.Position = position + index * 4; offset0 = reader.ReadInt32(); offset1 = reader.ReadInt32(); return; } offset0 = 0; offset1 = 0; }