Class FontQualifier
java.lang.Object
org.docx4j.fonts.fop.fonts.substitute.FontQualifier
public class FontQualifier
extends java.lang.Object
Encapsulates a font substitution qualifier
-
Constructor Summary
Constructors Constructor Description FontQualifier()Default constructor -
Method Summary
Modifier and Type Method Description protected FontTripletbestMatch(FontInfo fontInfo)Returns the highest priority matching font triplet found in a given font infoAttributeValuegetFontFamily()AttributeValuegetFontStyle()AttributeValuegetFontWeight()java.util.ListgetTriplets()booleanhasFontStyle()booleanhasFontWeight()protected java.util.Listmatch(FontInfo fontInfo)Returns a list of matching font triplet found in a given font infovoidsetFontFamily(java.lang.String fontFamily)Sets the font familyvoidsetFontStyle(java.lang.String fontStyle)Sets the font stylevoidsetFontWeight(java.lang.String fontWeight)Sets the font weightjava.lang.StringtoString()
-
Constructor Details
-
FontQualifier
public FontQualifier()Default constructor
-
-
Method Details
-
setFontFamily
public void setFontFamily(java.lang.String fontFamily)Sets the font family- Parameters:
fontFamily- the font family
-
setFontStyle
public void setFontStyle(java.lang.String fontStyle)Sets the font style- Parameters:
fontStyle- the font style
-
setFontWeight
public void setFontWeight(java.lang.String fontWeight)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
public java.util.List getTriplets()- Returns:
- a list of font triplets matching this qualifier
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-