BoundaryGlyphMap

open class BoundaryGlyphMap(val map: BoundaryMap, val glyphs: MutableMap<Int, Int> = mutableMapOf())(source)

Caches the boundaries of glyphs in a BoundaryMap, each glyph of a face is added to map once.

Inheritors

Constructors

Link copied to clipboard
constructor(map: BoundaryMap, glyphs: MutableMap<Int, Int> = mutableMapOf())

Properties

Link copied to clipboard

the boundary indices of glyphs, by a hash of their face and glyph index

Link copied to clipboard

the map the boundaries of glyphs are added to

Functions

Link copied to clipboard
fun endBatch()

Ends the batch started by startBatch and uploads the added glyphs

Link copied to clipboard
fun getBoundaryForGlyphIndex(face: Face, index: Int): Int

Returns the boundary index of the glyph at index in face, adding the glyph to map when it is not in it yet

Link copied to clipboard
fun getGlyph(face: Face, char: Char): Int

Returns the boundary index of the glyph for char in face

Link copied to clipboard

Starts a batch in map, glyphs added until endBatch is called are uploaded to the GPU at once