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

Statements: 75% (3 / 4)      Branches: 100% (0 / 0)      Functions: 0% (0 / 1)      Lines: 75% (3 / 4)      Ignored: none     

All files » fontkit/src/tables/ » hdmx.coffee
1 2 3 4 5 6 7 8 9 10 11 12 131   1           1        
r = require 'restructure'
 
DeviceRecord = new r.Struct
  pixelSize:      r.uint8
  maximumWidth:   r.uint8
  widths:         new r.Array(r.uint8, -> @parent.parent.maxp.numGlyphs)
 
# The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes
module.exports = new r.Struct
  version:            r.uint16
  numRecords:         r.int16
  sizeDeviceRecord:   r.int32
  records:            new r.Array(DeviceRecord, 'numRecords')