FontMetrics

class FontMetrics(pointer: <Error class: unknown class><<Error class: unknown class>>)

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

Skipped during bindings generation

  • field ref_count: Record field ref_count is private

  • field ascent: Record field ascent is private

  • field descent: Record field descent is private

  • field height: Record field height is private

  • field approximate_char_width: Record field approximate_char_width is private

  • field approximate_digit_width: Record field approximate_digit_width is private

  • field underline_position: Record field underline_position is private

  • field underline_thickness: Record field underline_thickness is private

  • field strikethrough_position: Record field strikethrough_position is private

  • field strikethrough_thickness: Record field strikethrough_thickness is private

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

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

Gets the approximate character width for a font metrics structure.

Link copied to clipboard

Gets the approximate digit width for a font metrics structure.

Link copied to clipboard
fun getAscent(): Int

Gets the ascent from a font metrics structure.

Link copied to clipboard

Gets the descent from a font metrics structure.

Link copied to clipboard
fun getHeight(): Int

Gets the line height from a font metrics structure.

Link copied to clipboard

Gets the suggested position to draw the strikethrough.

Link copied to clipboard

Gets the suggested thickness to draw for the strikethrough.

Link copied to clipboard

Gets the suggested position to draw the underline.

Link copied to clipboard

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.