MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / parseMaxpTable

Function parseMaxpTable

libraries/p5.js:5192–5214  ·  view source on GitHub ↗
(data, start)

Source from the content-addressed store, hash-verified

5190
5191// Parse the maximum profile `maxp` table.
5192function parseMaxpTable(data, start) {
5193 var maxp = {};
5194 var p = new parse.Parser(data, start);
5195 maxp.version = p.parseVersion();
5196 maxp.numGlyphs = p.parseUShort();
5197 if (maxp.version === 1.0) {
5198 maxp.maxPoints = p.parseUShort();
5199 maxp.maxContours = p.parseUShort();
5200 maxp.maxCompositePoints = p.parseUShort();
5201 maxp.maxCompositeContours = p.parseUShort();
5202 maxp.maxZones = p.parseUShort();
5203 maxp.maxTwilightPoints = p.parseUShort();
5204 maxp.maxStorage = p.parseUShort();
5205 maxp.maxFunctionDefs = p.parseUShort();
5206 maxp.maxInstructionDefs = p.parseUShort();
5207 maxp.maxStackElements = p.parseUShort();
5208 maxp.maxSizeOfInstructions = p.parseUShort();
5209 maxp.maxComponentElements = p.parseUShort();
5210 maxp.maxComponentDepth = p.parseUShort();
5211 }
5212
5213 return maxp;
5214}
5215
5216function makeMaxpTable(numGlyphs) {
5217 return new table.Table('maxp', [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected