Glyph

interface Glyph(source)

Glyph representation

Since

0.4.3

Properties

Link copied to clipboard
abstract val code: Int
Link copied to clipboard
abstract val index: Int
Link copied to clipboard

The vertical advance of the glyph in vertical text, in pixels, the distance the pen moves down, like the advances of org.openrndr.draw.font.internal.Direction.TOP_TO_BOTTOM text shaping: from vmtx, or the ascender minus the descender of the face when the font has no vertical metrics

Link copied to clipboard

The vertical origin of the glyph relative to its origin, in pixels with y pointing down: the point of the glyph that is placed on the vertical line, centered on the glyph and usually above the baseline. In vertical text a glyph is drawn at the pen position minus its vertical origin. From VORG, or from vmtx and the bounds of the glyph, or, when the font has no vertical metrics, centered on the verticalAdvance.

Functions

Link copied to clipboard
abstract fun advanceWidth(): Double
Link copied to clipboard
abstract fun bitmapBounds(contentScale: Double, subpixel: Boolean = true): IntRectangle

Compute the bitmap bounds of the glyph

Link copied to clipboard
abstract fun bounds(): Rectangle

Compute the glyph bounds in up=+y space

Link copied to clipboard
abstract fun leftSideBearing(): Double
Link copied to clipboard
abstract fun rasterize(contentScale: Double, bitmap: MPPBuffer, stride: Int, subpixel: Boolean)

Rasterize the glyph at the face's size

Link copied to clipboard
abstract fun shape(): Shape

Generate a Shape for this glyph

Link copied to clipboard
abstract fun topSideBearing(): Double