TypesetGlyph

class TypesetGlyph(val face: Face, val glyphIndex: Int, val position: Vector2, val style: TextStyle, val advance: Vector2? = null, val offset: Vector2 = Vector2.ZERO)(source)

A glyph placed by typesetText.

Parameters

position

the position of the glyph's origin on the baseline, includes the baseline shift

style

the fully cascaded style of the glyph

Constructors

Link copied to clipboard
constructor(face: Face, glyphIndex: Int, position: Vector2, style: TextStyle, advance: Vector2? = null, offset: Vector2 = Vector2.ZERO)

Properties

Link copied to clipboard
val advance: Vector2?

the advance of the pen for the glyph as it is shaped, null when it is not known

Link copied to clipboard
val face: Face
Link copied to clipboard
Link copied to clipboard
val offset: Vector2

the offset of position from the pen as the glyph is shaped

Link copied to clipboard
val penEnd: Vector2?

the position of the pen after the glyph, null when its advance is not known

Link copied to clipboard
val position: Vector2
Link copied to clipboard

Functions

Link copied to clipboard
fun transform(): Matrix44

The transform that places the outline of the glyph, as returned by org.openrndr.draw.font.Glyph.shape.