Face

A face (font) representation

Properties

Link copied to clipboard
abstract val ascent: Double
Link copied to clipboard
abstract val bounds: Rectangle
Link copied to clipboard
abstract val capHeight: Double
Link copied to clipboard

The positions and thicknesses of underlines and strikeouts, from the font when it has them, a fallback otherwise

Link copied to clipboard
abstract val descent: Double
Link copied to clipboard
abstract val emWidth: Double
Link copied to clipboard
abstract val height: Double
Link copied to clipboard
abstract val isVariable: Boolean

Indicates whether the font face is a variable font.

Link copied to clipboard
abstract val lineGap: Double
Link copied to clipboard
abstract val master: FaceMaster

Represents the master configuration of a font face.

Link copied to clipboard
abstract val sizeInPoints: Double
Link copied to clipboard
abstract val xHeight: Double

Functions

Link copied to clipboard
abstract fun allCodePoints(): Sequence<Int>

Retrieves a sequence of all code points supported by the font face.

Link copied to clipboard
abstract fun ascentMetrics(): Int
Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract fun descentMetrics(): Int
Link copied to clipboard
abstract fun glyphForCharacter(character: Char): Glyph

Return the glyph for a given character

Link copied to clipboard
abstract fun glyphForCodePoint(codePoint: Int): Glyph

Retrieves the glyph associated with the specified Unicode code point.

Link copied to clipboard
abstract fun glyphForIndex(glyphIndex: Int): Glyph

Retrieves the glyph corresponding to the specified glyph index.

Link copied to clipboard
abstract fun kernAdvance(left: Char, right: Char): Double

Calculates the horizontal kerning adjustment between two characters.

Link copied to clipboard
abstract fun lineGapMetrics(): Int
Link copied to clipboard
open fun positionFeatures(script: Script): List<String>

Queries the positioning (GPOS) features of this face for the given script, delegates to TextShapingDriver.queryPositionFeatures.

Link copied to clipboard

Queries the substitution (GSUB) features of this face for the given script, delegates to TextShapingDriver.querySubstitutionFeatures.

Link copied to clipboard

Queries the scripts supported by this face, delegates to TextShapingDriver.querySupportedScripts.

Link copied to clipboard
abstract fun unitsPerEm(): Int
Link copied to clipboard
abstract fun withMaster(master: FaceMaster): Face

Creates a new instance of the font face by applying the provided master parameters.

Link copied to clipboard
abstract fun withSize(sizeInPoints: Double): Face

Creates a new instance of the font face at the given size.