FontMetrics

class FontMetrics(pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

A PangoFontMetrics structure holds the overall metric information for a font.

The information in a PangoFontMetrics structure may be restricted to a script. The fields of this structure are private to implementations of a font backend. See the documentation of the corresponding getters for documentation of their meaning.

For an overview of the most important metrics, see:

Font metrics

Constructors

Link copied to clipboard
constructor()

Allocate a new FontMetrics.

constructor(scope: <Error class: unknown class>)

Allocate a new FontMetrics using the provided AutofreeScope.

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val pangoFontMetricsPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun getApproximateCharWidth(): <Error class: unknown class>

Gets the approximate character width for a font metrics structure.

Link copied to clipboard
fun getApproximateDigitWidth(): <Error class: unknown class>

Gets the approximate digit width for a font metrics structure.

Link copied to clipboard
fun getAscent(): <Error class: unknown class>

Gets the ascent from a font metrics structure.

Link copied to clipboard
fun getDescent(): <Error class: unknown class>

Gets the descent from a font metrics structure.

Link copied to clipboard
fun getHeight(): <Error class: unknown class>

Gets the line height from a font metrics structure.

Link copied to clipboard
fun getStrikethroughPosition(): <Error class: unknown class>

Gets the suggested position to draw the strikethrough.

Link copied to clipboard
fun getStrikethroughThickness(): <Error class: unknown class>

Gets the suggested thickness to draw for the strikethrough.

Link copied to clipboard
fun getUnderlinePosition(): <Error class: unknown class>

Gets the suggested position to draw the underline.

Link copied to clipboard
fun getUnderlineThickness(): <Error class: unknown class>

Gets the suggested thickness to draw for the underline.

Link copied to clipboard

Increase the reference count of a font metrics structure by one.

Link copied to clipboard
fun unref()

Decrease the reference count of a font metrics structure by one.