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

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10         16× 16×  
r = require 'restructure'
 
HmtxEntry = new r.Struct
  advance: r.uint16
  bearing: r.int16
 
module.exports = new r.Struct
  metrics:    new r.LazyArray(HmtxEntry, -> @parent.hhea.numberOfMetrics)
  bearings:   new r.LazyArray(r.int16, -> @parent.maxp.numGlyphs - @parent.hhea.numberOfMetrics)