Class FontFamily

All Implemented Interfaces:
PointerInterface

public class FontFamily extends Object
A `PangoFontFamily` is used to represent a family of related
font faces.

The font faces in a family share a common design, but differ in
slant, weight, width or other aspects.

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

  • Constructor Details

  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getFace

      public FontFace getFace(@Nullable Str name)
      Gets the `PangoFontFace` of @family with the given name.
      Parameters:
      name - the name of a face. If the name is %NULL, the family's default face (fontconfig calls it "Regular") will be returned.
      Returns:
      the `PangoFontFace`, or %NULL if no face with the given name exists.
    • getFace

      public FontFace getFace(String name)
      Gets the `PangoFontFace` of @family with the given name.
      Parameters:
      name - the name of a face. If the name is %NULL, the family's default face (fontconfig calls it "Regular") will be returned.
      Returns:
      the `PangoFontFace`, or %NULL if no face with the given name exists.
    • getName

      public Str getName()
      Gets the name of the family.

      The name is unique among all fonts for the font backend and can
      be used in a `PangoFontDescription` to specify that a face from
      this family is desired.
      Returns:
      the name of the family. This string is owned by the family object and must not be modified or freed.
    • isMonospace

      public boolean isMonospace()
      A monospace font is a font designed for text display where the the
      characters form a regular grid.

      For Western languages this would
      mean that the advance width of all characters are the same, but
      this categorization also includes Asian fonts which include
      double-width characters: characters that occupy two grid cells.
      g_unichar_iswide() returns a result that indicates whether a
      character is typically double-width in a monospace font.

      The best way to find out the grid-cell size is to call
      [method@Pango.FontMetrics.get_approximate_digit_width], since the
      results of [method@Pango.FontMetrics.get_approximate_char_width] may
      be affected by double-width characters.
      Returns:
      %TRUE if the family is monospace.
    • isVariable

      public boolean isVariable()
      A variable font is a font which has axes that can be modified to
      produce different faces.

      Such axes are also known as _variations_; see
      [method@Pango.FontDescription.set_variations] for more information.
      Returns:
      %TRUE if the family is variable
    • 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()