Class Fontset

All Implemented Interfaces:
Proxy
Direct Known Subclasses:
Fontset.Fontset$Impl, FontsetSimple

@Generated("org.javagi.JavaGI") public abstract class Fontset extends GObject

A PangoFontset represents a set of PangoFont to use when rendering text.

A PangoFontset is the result of resolving a PangoFontDescription against a particular PangoContext. It has operations for finding the component font for a particular Unicode character, and for finding a composite set of metrics for the entire fontset.

  • Constructor Details

    • Fontset

      public Fontset(MemorySegment address)
      Create a Fontset instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Fontset

      public Fontset()
      Create a new Fontset.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Fontset class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Fontset asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • foreach

      public void foreach(@Nullable FontsetForeachFunc func)

      Iterates through all the fonts in a fontset, calling func for each one.

      If func returns true, that stops the iteration.

      Parameters:
      func - Callback function
      Since:
      1.4
    • getFont

      public Font getFont(int wc)
      Returns the font in the fontset that contains the best glyph for a Unicode character.
      Parameters:
      wc - a Unicode character
      Returns:
      a PangoFont
    • getMetrics

      public FontMetrics getMetrics()
      Get overall metric information for the fonts in the fontset.
      Returns:
      a PangoFontMetrics object
    • getLanguage

      protected Language getLanguage()
      a function to get the language of the fontset.