Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PangoFontMetricsLayout

[12:14] static extends: object

Generated struct layout helper for GIR record FontMetrics.

Methods

  • layout ()

    Returns the Panama struct layout for FontMetrics.

class: PangoFontMetrics

[43:7] extends: object

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

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • PangoFontMetrics (Handle = null)

    Creates a new FontMetrics by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • get_approximate_char_width ()

    Gets the approximate character width for a font metrics structure. This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this.

    • @r the character width, in Pango units..
  • get_approximate_digit_width ()

    Gets the approximate digit width for a font metrics structure. This is merely a representative value useful, for example, for determining the initial size for a window. Actual digits in text can be wider or narrower than this, though this value is generally somewhat more accurate than the result of pango_font_metrics_get_approximate_char_width() for digits.

    • @r the digit width, in Pango units..
  • get_ascent ()

    Gets the ascent from a font metrics structure. The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

    • @r the ascent, in Pango units..
  • get_descent ()

    Gets the descent from a font metrics structure. The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)

    • @r the descent, in Pango units..
  • get_height ()

    Gets the line height from a font metrics structure. The line height is the recommended distance between successive baselines in wrapped text using this font. If the line height is not available, 0 is returned.

    • @r the height, in Pango units.
  • get_strikethrough_position ()

    Gets the suggested position to draw the strikethrough. The value returned is the distance above the baseline of the top of the strikethrough.

    • @r the suggested strikethrough position, in Pango units..
  • get_strikethrough_thickness ()

    Gets the suggested thickness to draw for the strikethrough.

    • @r the suggested strikethrough thickness, in Pango units..
  • get_underline_position ()

    Gets the suggested position to draw the underline. The value returned is the distance above the baseline of the top of the underline. Since most fonts have underline positions beneath the baseline, this value is typically negative.

    • @r the suggested underline position, in Pango units..
  • get_underline_thickness ()

    Gets the suggested thickness to draw for the underline.

    • @r the suggested underline thickness, in Pango units..
  • ref ()

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

    • @r @metrics.
  • unref ()

    Decrease the reference count of a font metrics structure by one. If the result is zero, frees the structure and any associated memory.

    • @r None.