org.apache.fop.tools.fontlist

## Class FontSpec

- java.lang.Object
- - org.apache.fop.tools.fontlist.FontSpec

- All Implemented Interfaces:
    Comparable

      public class FontSpec
      extends Object
      implements Comparable

  Represents a font with information on how it can be used from XSL-FO.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FontSpec(String key, FontMetrics metrics)` Creates a new font spec.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFamilyNames(Collection<String> names)` Adds font family names.
    `void` | `addTriplet(FontTriplet triplet)` Adds a font triplet.
    `int` | `compareTo(Object o)`
    `boolean` | `equals(Object o)`
    `SortedSet` | `getFamilyNames()` Returns the font family names.
    `FontMetrics` | `getFontMetrics()` Returns the font metrics.
    `String` | `getKey()` Returns the internal font key.
    `Collection` | `getTriplets()` Returns the font triplets.
    `int` | `hashCode()`

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

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

- - ### Constructor Detail

    - #### FontSpec

          public FontSpec(String key,
                          FontMetrics metrics)

      Creates a new font spec.
      Parameters:
        `key` - the internal font key
        `metrics` - the font metrics

  - ### Method Detail

    - #### addFamilyNames

          public void addFamilyNames(Collection<String> names)

      Adds font family names.
      Parameters:
        `names` - the names

    - #### addTriplet

          public void addTriplet(FontTriplet triplet)

      Adds a font triplet.
      Parameters:
        `triplet` - the font triplet

    - #### getFamilyNames

          public SortedSet getFamilyNames()

      Returns the font family names.
      Returns:
        the font family names

    - #### getTriplets

          public Collection getTriplets()

      Returns the font triplets.
      Returns:
        the font triplets

    - #### getKey

          public String getKey()

      Returns the internal font key.
      Returns:
        the internal font key

    - #### getFontMetrics

          public FontMetrics getFontMetrics()

      Returns the font metrics.
      Returns:
        the font metrics

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### compareTo

          public int compareTo(Object o)

      Specified by:
        `compareTo` in interface `Comparable`

Copyright © 2023 Apache Software Foundation. All rights reserved.