function GlyphInfo(font, id, codePoints, features) {
    if (codePoints === void 0) {
      codePoints = [];
    }

    this._font = font;
    this.codePoints = codePoints;
    this.id = id;
    this.features = {};

    if (Array.isArray(features)) {
      for (var i = 0; i < features.length; i++) {
        var feature = features[i];
        this.features[feature] = true;
      }
    } else if (typeof features === 'object') {
      Object.assign(this.features, features);
    }

    this.ligatureID = null;
    this.ligatureComponent = null;
    this.isLigated = false;
    this.cursiveAttachment = null;
    this.markAttachment = null;
    this.shaperInfo = null;
    this.substituted = false;
    this.isMultiplied = false;
  }
This is a shaper for the Hangul script, used by the Korean language.
It does the following:
  - decompose if unsupported by the font:
    <LV>   -> <L,V>
    <LVT>  -> <L,V,T>
    <LV,T> -> <L,V,T>

  - compose if supported by the font:
    <L,V>   -> <LV>
    <L,V,T> -> <LVT>
    <LV,T>  -> <LVT>

  - reorder tone marks (S is any valid syllable):
    <S, M> -> <M, S>

  - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.

This logic is based on the following documents:
  - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm
  - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf