parseGlyfTableOnLowMemory function

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

Implementation

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

    font._push = (i) {
      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;
}