GlyphSet constructor

GlyphSet(
  1. dynamic font,
  2. dynamic glyphs
)

Implementation

GlyphSet(font, glyphs) {
  this.font = font;
  this.glyphs = {};
  if ( glyphs is List ) {
    for (var i = 0; i < glyphs.length; i++) {
      var glyph = glyphs[i];
      glyph.path.unitsPerEm = font.unitsPerEm;
      this.glyphs[i] = glyph;
    }
  }

  this.length = glyphs != null ? glyphs.length : 0;
}