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 AttributeValue
font family attribute valueprivate AttributeValue
font style attribute valueprivate AttributeValue
font weight attribute valueprivate static org.apache.commons.logging.Log
logger instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FontTriplet
Returns the highest priority matching font triplet found in a given font infoboolean
boolean
protected List<FontTriplet>
Returns a list of matching font triplet found in a given font infovoid
setFontFamily
(String fontFamily) Sets the font familyvoid
setFontStyle
(String fontStyle) Sets the font stylevoid
setFontWeight
(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
-