Class FontMap

All Implemented Interfaces:
PointerInterface

public class FontMap extends Object
A `PangoFontMap` represents the set of fonts available for a
particular rendering system.

This is a virtual object with implementations being specific to
particular rendering systems.

https://docs.gtk.org/Pango/class.FontMap.html

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • changed

      public void changed()
      Forces a change in the context, which will cause any `PangoContext`
      using this fontmap to change.

      This function is only useful when implementing a new backend
      for Pango, something applications won't do. Backends should
      call this function if they have attached extra data to the
      context and such data is changed.
    • createContext

      public Context createContext()
      Creates a `PangoContext` connected to @fontmap.

      This is equivalent to [ctor@Pango.Context.new] followed by
      [method@Pango.Context.set_font_map].

      If you are using Pango as part of a higher-level system,
      that system may have it's own way of create a `PangoContext`.
      For instance, the GTK toolkit has, among others,
      gtk_widget_get_pango_context(). Use those instead.
      Returns:
      the newly allocated `PangoContext`, which should be freed with g_object_unref().
    • getFamily

      public FontFamily getFamily(@Nonnull Str name)
      Gets a font family by name.
      Parameters:
      name - a family name
      Returns:
      the `PangoFontFamily`
    • getFamily

      public FontFamily getFamily(String name)
      Gets a font family by name.
      Parameters:
      name - a family name
      Returns:
      the `PangoFontFamily`
    • getSerial

      public int getSerial()
      Returns the current serial number of @fontmap.

      The serial number is initialized to an small number larger than zero
      when a new fontmap is created and is increased whenever the fontmap
      is changed. It may wrap, but will never have the value 0. Since it can
      wrap, never compare it with "less than", always use "not equals".

      The fontmap can only be changed using backend-specific API, like changing
      fontmap resolution.

      This can be used to automatically detect changes to a `PangoFontMap`,
      like in `PangoContext`.
      Returns:
      The current serial number of @fontmap.
    • loadFont

      public Font loadFont(@Nonnull Context context, @Nonnull FontDescription desc)
      Load the font in the fontmap that is the closest match for @desc.
      Parameters:
      context - the `PangoContext` the font will be used with
      desc - a `PangoFontDescription` describing the font to load
      Returns:
      the newly allocated `PangoFont` loaded, or %NULL if no font matched.
    • loadFontset

      public Fontset loadFontset(@Nonnull Context context, @Nonnull FontDescription desc, @Nonnull Language language)
      Load a set of fonts in the fontmap that can be used to render
      a font matching @desc.
      Parameters:
      context - the `PangoContext` the font will be used with
      desc - a `PangoFontDescription` describing the font to load
      language - a `PangoLanguage` the fonts will be used for
      Returns:
      the newly allocated `PangoFontset` loaded, or %NULL if no font matched.
    • asListModel

      public ListModel asListModel()
      Implements interface ListModel. Call this to get access to interface functions.
      Returns:
      ListModel
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()