org.apache.fop.fonts

## Class FontTriplet

- java.lang.Object
- - org.apache.fop.fonts.FontTriplet

- All Implemented Interfaces:
    Serializable, Comparable<FontTriplet>

      public class FontTriplet
      extends Object
      implements Comparable<FontTriplet>, Serializable

  FontTriplet contains information on name, style and weight of one font
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `FontTriplet.Matcher` Matcher interface for `FontTriplet`.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static FontTriplet` | `DEFAULT_FONT_TRIPLET`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FontTriplet()`
    `FontTriplet(String name, String style, int weight)` Creates a new font triplet.
    `FontTriplet(String name, String style, int weight, int priority)` Creates a new font triplet.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(FontTriplet o)`
    `boolean` | `equals(Object obj)`
    `String` | `getName()`
    `int` | `getPriority()`
    `String` | `getStyle()`
    `int` | `getWeight()`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_FONT_TRIPLET

          public static final FontTriplet DEFAULT_FONT_TRIPLET

  - ### Constructor Detail

    - #### FontTriplet

          public FontTriplet()

    - #### FontTriplet

          public FontTriplet(String name,
                             String style,
                             int weight)

      Creates a new font triplet.
      Parameters:
        `name` - font name
        `style` - font style (normal, italic etc.)
        `weight` - font weight (100, 200, 300...800, 900)

    - #### FontTriplet

          public FontTriplet(String name,
                             String style,
                             int weight,
                             int priority)

      Creates a new font triplet.
      Parameters:
        `name` - font name
        `style` - font style (normal, italic etc.)
        `weight` - font weight (100, 200, 300...800, 900)
        `priority` - priority of this triplet/font mapping

  - ### Method Detail

    - #### getName

          public String getName()

      Returns:
        the font name

    - #### getStyle

          public String getStyle()

      Returns:
        the font style

    - #### getWeight

          public int getWeight()

      Returns:
        the font weight

    - #### getPriority

          public int getPriority()

      Returns:
        the priority of this triplet/font mapping

    - #### compareTo

          public int compareTo(FontTriplet o)

      Specified by:
        `compareTo` in interface `Comparable<FontTriplet>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2023 Apache Software Foundation. All rights reserved.