Code coverage report for fontkit/src/tables/trak.coffee

Statements: 80% (4 / 5)      Branches: 100% (0 / 0)      Functions: 0% (0 / 1)      Lines: 80% (4 / 5)      Ignored: none     

All files » fontkit/src/tables/ » trak.coffee
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 231   1             1             1            
r = require 'restructure'
 
TrackTableEntry = new r.Struct
  track: r.fixed32
  nameIndex: r.uint16
  # name: -> @parent.parent.parent.name.records#.fontFeatures.English#[@nameIndex]
  # offset: r.uint16
  values: new r.Pointer(r.uint16, new r.Array(r.int16, -> @parent.nSizes), type: 'parent')
 
TrackData = new r.Struct
  nTracks: r.uint16
  nSizes: r.uint16
  sizeTableOffset: r.uint32
  trackTable: new r.Array(TrackTableEntry, 'nTracks')
  sizeTable: new r.Array(r.fixed32, 'nSizes')
 
module.exports = new r.Struct
  version: r.fixed32
  format: r.uint16
  horizontal: new r.Pointer(r.uint16, TrackData)
  vertical: new r.Pointer(r.uint16, TrackData)
  reserved: new r.Reserved(r.uint16)