parseVersion method

dynamic parseVersion(
  1. dynamic minorBase
)

Implementation

parseVersion(minorBase) {
  var major = getUShort(this.data, this.offset + this.relativeOffset);

  // How to interpret the minor version is very vague in the spec. 0x5000 is 5, 0x1000 is 1
  // Default returns the correct number if minor = 0xN000 where N is 0-9
  // Set minorBase to 1 for tables that use minor = N where N is 0-9
  var minor = getUShort(this.data, this.offset + this.relativeOffset + 2);
  this.relativeOffset += 4;
  if (minorBase == null) minorBase = 0x1000;
  return major + minor / minorBase / 10;
}