UNPKG

hummus-recipe

Version:

A powerful PDF tool for NodeJS based on HummusJS

12 lines (9 loc) 319 B
import r from 'restructure'; let HmtxEntry = new r.Struct({ advance: r.uint16, bearing: r.int16 }); export default new r.Struct({ metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics), bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics) });