TextRenderer

actual open class TextRenderer(rc: RenderContext)
expect class TextRenderer(rc: RenderContext)
actual open class TextRenderer(rc: RenderContext)

iOS TextRenderer. Lays text out as an NSAttributedString using the engine's Font (mapped to a UIFont), draws each line into a tightly-packed RGBA8 CGBitmapContext via UIKit's text drawing APIs, then wraps the resulting bytes in an ImageTexture for GL upload.

Multi-line text is split on \n and stacked vertically — same semantics as the JVM/Android port. Outline rendering uses a two-pass approach when attributes.isOutlineEnabled: an NSStrokeColor + positive NSStrokeWidth pass draws the outlined shape underneath, then the regular NSForegroundColor pass paints the fill on top. UIKit's NSStrokeWidth is documented as a percentage of font point size (positive = stroke only, negative = stroke + fill); we convert outlineWidth_px → (outlineWidth / fontSize) * 100 to match the JVM's pixel-based BasicStroke width semantics.

actual open class TextRenderer(rc: RenderContext)
actual open class TextRenderer(rc: RenderContext)

Constructors

Link copied to clipboard
actual constructor(rc: RenderContext)
expect constructor(rc: RenderContext)
actual constructor(rc: RenderContext)
actual constructor(rc: RenderContext)
actual constructor(rc: RenderContext)

Functions

Link copied to clipboard
actual fun renderText(text: String?, attributes: TextAttributes): Texture?

Creates a texture for a specified text string and specified text attributes.

expect fun renderText(text: String?, attributes: TextAttributes): Texture?
actual fun renderText(text: String?, attributes: TextAttributes): Texture?
actual fun renderText(text: String?, attributes: TextAttributes): Texture?

Creates a texture for a specified text string and specified text attributes.

actual fun renderText(text: String?, attributes: TextAttributes): Texture?

Creates a texture for a specified text string and specified text attributes.