long offset = recordOffset(low)+buffer.filePosition();
long end = Math.min(recordOffset(high)+buffer.filePosition(), source.length());
try {
MappedFile mf = MappedFile.Util.make(source, FileChannel.MapMode.READ_ONLY, BUFFER_BYTES, offset, end);
if (mf == null) {return new GlyphList<>();}
mf.order(buffer.order());
return new MemMapList<>(mf, source, shaper, valuer, types, 0);
} catch (Exception e) {
throw new RuntimeException(String.format("Error segmenting glyphset (parameters %d, %d)", count, segId), e);
}
}