Package org.apache.fop.fo.properties
Class CommonFont
- java.lang.Object
-
- org.apache.fop.fo.properties.CommonFont
-
public final class CommonFont extends java.lang.ObjectCollection of CommonFont properties
-
-
Field Summary
Fields Modifier and Type Field Description LengthfontSizeThe "font-size" property.NumericfontSizeAdjustThe "font-size-adjust" property.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetFirstFontFamily()intgetFontSelectionStrategy()LengthgetFontSize()NumericgetFontSizeAdjust()FontTriplet[]getFontState(FontInfo fontInfo)Create and return an array ofFontTripletsbased on the properties stored in the instance variables.intgetFontStretch()intgetFontStyle()intgetFontVariant()intgetFontWeight()static CommonFontgetInstance(PropertyList pList)Returns a CommonFont instance for the given PropertyList If the font-size and font-size-adjust properties are absolute the entire instance will be cached.inthashCode()
-
-
-
Method Detail
-
getInstance
public static CommonFont getInstance(PropertyList pList) throws PropertyException
Returns a CommonFont instance for the given PropertyList If the font-size and font-size-adjust properties are absolute the entire instance will be cached. If not, then a distinct instance will be returned, with as much cached information as possible.- Parameters:
pList- the PropertyList to get the properties from- Returns:
- a CommonFont instance corresponding to the properties
- Throws:
PropertyException- if there was a problem getting the properties
-
getFirstFontFamily
public java.lang.String getFirstFontFamily()
- Returns:
- the first font-family name in the list
-
getFontSelectionStrategy
public int getFontSelectionStrategy()
- Returns:
- the "font-selection-strategy" property
-
getFontStretch
public int getFontStretch()
- Returns:
- the "font-stretch" property
-
getFontStyle
public int getFontStyle()
- Returns:
- the "font-style" property
-
getFontVariant
public int getFontVariant()
- Returns:
- the "font-variant" property
-
getFontWeight
public int getFontWeight()
- Returns:
- the "font-weight" property
-
getFontSize
public Length getFontSize()
- Returns:
- the "font-size" property.
-
getFontSizeAdjust
public Numeric getFontSizeAdjust()
- Returns:
- the "font-size-adjust" property.
-
getFontState
public FontTriplet[] getFontState(FontInfo fontInfo)
Create and return an array ofFontTripletsbased on the properties stored in the instance variables.- Parameters:
fontInfo- a font info object- Returns:
- a font triplet
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-