readGlyph method

TtfGlyphInfo readGlyph(
  1. int index
)

Implementation

TtfGlyphInfo readGlyph(int index) {
  assert(index < glyphOffsets.length);

  final start = tableOffsets[glyf_table]! + glyphOffsets[index];

  final numberOfContours = bytes.getInt16(start);
  assert(numberOfContours >= -1);

  if (numberOfContours == -1) {
    return _readCompoundGlyph(index, start, start + 10);
  } else {
    return _readSimpleGlyph(index, start, start + 10, numberOfContours);
  }
}