function nextSyllable(glyphs, start) {
  if (start >= glyphs.length) return start;
  var syllable = glyphs[start].shaperInfo.syllable;

  while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable) {}

  return start;
}
This shaper is an implementation of the Universal Shaping Engine, which
uses Unicode data to shape a number of scripts without a dedicated shaping engine.
See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.