caretValue function

dynamic caretValue(
  1. dynamic scope
)

Implementation

caretValue(scope) {
  var format = scope.parseUShort();
  argument(format == 1 || format == 2 || format == 3,
      'Unsupported CaretValue table version.');
  if (format == 1) {
    return { "coordinate": scope.parseShort() };
  } else if (format == 2) {
    return { "pointindex": scope.parseShort() };
  } else if (format == 3) {
      // Device / Variation Index tables unsupported
    return { "coordinate": scope.parseShort() };
  }
}