Package org.apache.fop.fonts.substitute
Class FontQualifier
java.lang.Object
org.apache.fop.fonts.substitute.FontQualifier
Encapsulates a font substitution qualifier
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AttributeValuefont family attribute valueprivate AttributeValuefont style attribute valueprivate AttributeValuefont weight attribute valueprivate static org.apache.commons.logging.Loglogger instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FontTripletReturns the highest priority matching font triplet found in a given font infobooleanbooleanprotected List<FontTriplet> Returns a list of matching font triplet found in a given font infovoidsetFontFamily(String fontFamily) Sets the font familyvoidsetFontStyle(String fontStyle) Sets the font stylevoidsetFontWeight(String fontWeight) Sets the font weighttoString()
-
Field Details
-
log
private static org.apache.commons.logging.Log loglogger instance -
fontFamilyAttributeValue
font family attribute value -
fontStyleAttributeValue
font style attribute value -
fontWeightAttributeValue
font weight attribute value
-
-
Constructor Details
-
FontQualifier
public FontQualifier()Default constructor
-
-
Method Details
-
setFontFamily
Sets the font family- Parameters:
fontFamily- the font family
-
setFontStyle
Sets the font style- Parameters:
fontStyle- the font style
-
setFontWeight
Sets the font weight- Parameters:
fontWeight- the font weight
-
getFontFamily
- Returns:
- the font family attribute
-
getFontStyle
- Returns:
- the font style attribute
-
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
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
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
- Returns:
- a list of font triplets matching this qualifier
-
toString
-