Klasse FontMap

Alle implementierten Schnittstellen:
PointerInterface

public class FontMap extends PropertyHolder
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

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • addFontFile

      public boolean addFontFile(@Nonnull Str filename) throws AllocationError
      Loads a font file with one or more fonts into the `PangoFontMap`.

      The added fonts will take precedence over preexisting
      fonts with the same name.
      Parameter:
      filename - Path to the font file
      Gibt zurück:
      True if the font file is successfully loaded into the fontmap, false if an error occurred.
      Löst aus:
      AllocationError
    • addFontFile

      public boolean addFontFile(String filename) throws AllocationError
      Loads a font file with one or more fonts into the `PangoFontMap`.

      The added fonts will take precedence over preexisting
      fonts with the same name.
      Parameter:
      filename - Path to the font file
      Gibt zurück:
      True if the font file is successfully loaded into the fontmap, false if an error occurred.
      Löst aus:
      AllocationError
    • 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.
      Gibt zurück:
      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.
      Parameter:
      name - a family name
      Gibt zurück:
      the `PangoFontFamily`
    • getFamily

      public FontFamily getFamily(String name)
      Gets a font family by name.
      Parameter:
      name - a family name
      Gibt zurück:
      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`.
      Gibt zurück:
      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.
      Parameter:
      context - the `PangoContext` the font will be used with
      desc - a `PangoFontDescription` describing the font to load
      Gibt zurück:
      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.
      Parameter:
      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
      Gibt zurück:
      the newly allocated `PangoFontset` loaded, or %NULL if no font matched.
    • reloadFont

      public Font reloadFont(@Nonnull Font font, double scale, @Nullable Context context, @Nullable Str variations)
      Returns a new font that is like @font, except that its size
      is multiplied by @scale, its backend-dependent configuration
      (e.g. cairo font options) is replaced by the one in @context,
      and its variations are replaced by @variations.
      Parameter:
      font - a font in @fontmap
      scale - the scale factor to apply
      context - a `PangoContext`
      variations - font variations to use
      Gibt zurück:
      the modified font
    • reloadFont

      public Font reloadFont(@Nonnull Font font, double scale, @Nullable Context context, String variations)
      Returns a new font that is like @font, except that its size
      is multiplied by @scale, its backend-dependent configuration
      (e.g. cairo font options) is replaced by the one in @context,
      and its variations are replaced by @variations.
      Parameter:
      font - a font in @fontmap
      scale - the scale factor to apply
      context - a `PangoContext`
      variations - font variations to use
      Gibt zurück:
      the modified font
    • asListModel

      public ListModel asListModel()
      Implements interface ListModel. Call this to get access to interface functions.
      Gibt zurück:
      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()