ttfGlyphLoader top-level property

Function ttfGlyphLoader
getter/setter pair

Implementation

Function ttfGlyphLoader = (font, index, parseGlyph, data, position, buildPath) {
  return () {
    var glyph = new Glyph({"index": index, "font": font});


    glyph.path = () {
      parseGlyph(glyph, data, position);
      var path = buildPath(font.glyphs, glyph);
      path.unitsPerEm = font.unitsPerEm;
      return path;
    };

    // defineDependentProperty(glyph, 'xMin', '_xMin');
    // defineDependentProperty(glyph, 'xMax', '_xMax');
    // defineDependentProperty(glyph, 'yMin', '_yMin');
    // defineDependentProperty(glyph, 'yMax', '_yMax');

    return glyph;
  };
};