constructor({ glyfTable, isGlyphLocationsLong, locaTable, numGlyphs }) {
    this.glyphs = [];
    const loca = new DataView(
      locaTable.buffer,
      locaTable.byteOffset,
      locaTable.byteLength
    );
    const glyf = new DataView(
      glyfTable.buffer,
      glyfTable.byteOffset,
      glyfTable.byteLength
    );
    const offsetSize = isGlyphLocationsLong ? 4 : 2;
    let prev = isGlyphLocationsLong ? loca.getUint32(0) : 2 * loca.getUint16(0);
    let pos = 0;
    for (let i = 0; i < numGlyphs; i++) {
      pos += offsetSize;
      const next = isGlyphLocationsLong
        ? loca.getUint32(pos)
        : 2 * loca.getUint16(pos);
      if (next === prev) {
        this.glyphs.push(new Glyph({}));
        continue;
      }

      const glyph = Glyph.parse(prev, glyf);
      this.glyphs.push(glyph);

      prev = next;
    }
  }
GlyfTable object represents a glyf table containing glyph information:
 - glyph header (xMin, yMin, xMax, yMax);
 - contours if any;
 - components if the glyph is a composite.

It's possible to re-scale each glyph in order to have a new font which
exactly fits an other one: the goal is to be able to build some substitution
font for well-known fonts (Myriad, Arial, ...).

A full description of glyf table can be found here
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html