harmonink 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/measure.js +1 -0
package/package.json
CHANGED
package/src/measure.js
CHANGED
|
@@ -111,6 +111,7 @@ export function measure(buf, opts = {}) {
|
|
|
111
111
|
|
|
112
112
|
const head = new Reader(tables.head, 18);
|
|
113
113
|
const unitsPerEm = head.u16();
|
|
114
|
+
if (!unitsPerEm) throw corrupt('units per em is zero'); // every ratio below divides by it
|
|
114
115
|
const indexToLocFormat = new Reader(tables.head, 50).i16();
|
|
115
116
|
const numGlyphs = new Reader(tables.maxp, 4).u16();
|
|
116
117
|
const numHMetrics = new Reader(tables.hhea, 34).u16();
|