TextShapingDriver

Interface for implementing text shaping logic.

A TextShapingDriver is responsible for converting a string of characters into a visually accurate sequence of shaped glyphs, accounting for font-specific details, writing direction, and script characteristics. This process is pivotal in rendering text in a way that adheres to the typographic and linguistic rules of the specified script and language system.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun queryPositionFeatures(face: Face, script: Script): List<String>

Queries the position features available in the specified font face for a given script.

Link copied to clipboard
abstract fun querySubstitutionFeatures(face: Face, script: Script): List<String>

Queries the substitution features available in the specified font face for a given script.

Link copied to clipboard

Queries the scripts supported by the specified font face.

Link copied to clipboard
abstract fun shape(face: Face, text: String, features: List<ShapeFeature> = emptyList(), direction: Direction? = null, script: Script? = null, language: String? = null): List<ShapeResult>

Shapes the given text into a sequence of glyphs according to the specific font face and optional typographic attributes like writing direction and script.