all files / fontkit/src/tables/ bsln.coffee

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26                                            
r = require 'restructure'
{LookupTable} = require './aat'
 
BslnSubtable = new r.VersionedStruct 'format',
  0: # Distance-based, no mapping
    deltas: new r.Array(r.int16, 32)
    
  1: # Distance-based, with mapping
    deltas: new r.Array(r.int16, 32)
    mappingData: new LookupTable(r.uint16)
    
  2: # Control point-based, no mapping
    standardGlyph: r.uint16
    controlPoints: new r.Array(r.uint16, 32)
    
  3: # Control point-based, with mapping
    standardGlyph: r.uint16
    controlPoints: new r.Array(r.uint16, 32)
    mappingData: new LookupTable(r.uint16)
 
module.exports = new r.Struct
  version: r.fixed32
  format: r.uint16
  defaultBaseline: r.uint16
  subtable: BslnSubtable