public static HeadTable Deserialize(BinaryReader reader, long startOffset) { var table = new HeadTable(); reader.BaseStream.Position = startOffset; table.Version = DataTypeConverter.ReadFixed(reader); table.FontRevision = DataTypeConverter.ReadFixed(reader); reader.BaseStream.Position += 2 * DataTypeLength.ULong; table.Flags = DataTypeConverter.ReadUShort(reader); table.UnitsPerEm = DataTypeConverter.ReadUShort(reader); table.CreateTime = DataTypeConverter.ReadLongDateTime(reader); table.ModifyTime = DataTypeConverter.ReadLongDateTime(reader); table.XMin = DataTypeConverter.ReadShort(reader); table.YMin = DataTypeConverter.ReadShort(reader); table.XMax = DataTypeConverter.ReadShort(reader); table.YMax = DataTypeConverter.ReadShort(reader); table.MacStyle = DataTypeConverter.ReadUShort(reader); table.LowestRecPpem = DataTypeConverter.ReadUShort(reader); reader.BaseStream.Position += DataTypeLength.Short; table.LocaTableVersion = (LocaTableVersion)DataTypeConverter.ReadShort(reader); return(table); }