Class FontQualifier

java.lang.Object
org.apache.fop.fonts.substitute.FontQualifier

public class FontQualifier extends Object
Encapsulates a font substitution qualifier
  • Field Details

    • log

      private static org.apache.commons.logging.Log log
      logger instance
    • fontFamilyAttributeValue

      private AttributeValue fontFamilyAttributeValue
      font family attribute value
    • fontStyleAttributeValue

      private AttributeValue fontStyleAttributeValue
      font style attribute value
    • fontWeightAttributeValue

      private AttributeValue fontWeightAttributeValue
      font weight attribute value
  • Constructor Details

    • FontQualifier

      public FontQualifier()
      Default constructor
  • Method Details

    • setFontFamily

      public void setFontFamily(String fontFamily)
      Sets the font family
      Parameters:
      fontFamily - the font family
    • setFontStyle

      public void setFontStyle(String fontStyle)
      Sets the font style
      Parameters:
      fontStyle - the font style
    • setFontWeight

      public void setFontWeight(String fontWeight)
      Sets the font weight
      Parameters:
      fontWeight - the font weight
    • getFontFamily

      public AttributeValue getFontFamily()
      Returns:
      the font family attribute
    • getFontStyle

      public AttributeValue getFontStyle()
      Returns:
      the font style attribute
    • getFontWeight

      public AttributeValue getFontWeight()
      Returns:
      the font weight attribute
    • hasFontWeight

      public boolean hasFontWeight()
      Returns:
      true if this rule has a font weight
    • hasFontStyle

      public boolean hasFontStyle()
      Returns:
      true if this rule has a font style
    • match

      protected List<FontTriplet> match(FontInfo fontInfo)
      Returns a list of matching font triplet found in a given font info
      Parameters:
      fontInfo - the font info
      Returns:
      a list of matching font triplets
    • bestMatch

      protected FontTriplet bestMatch(FontInfo fontInfo)
      Returns the highest priority matching font triplet found in a given font info
      Parameters:
      fontInfo - the font info
      Returns:
      the highest priority matching font triplet
    • getTriplets

      public List<FontTriplet> getTriplets()
      Returns:
      a list of font triplets matching this qualifier
    • toString

      public String toString()
      Overrides:
      toString in class Object