parseGlyfTableAll function

dynamic parseGlyfTableAll(
  1. dynamic data,
  2. dynamic start,
  3. dynamic loca,
  4. dynamic font,
)

Implementation

parseGlyfTableAll(data, start, loca, font) {
    var glyphs = new GlyphSet(font, null);

    // The last element of the loca table is invalid.
    for (var i = 0; i < loca.length - 1; i += 1) {
      var offset = loca[i];
      var nextOffset = loca[i + 1];
      if (offset != nextOffset) {
          glyphs.push(i, ttfGlyphLoader(font, i, parseGlyph, data, start + offset, buildPath));
      } else {
          glyphs.push(i, glyphLoader(font, i));
      }
    }

    return glyphs;
}