Font SFO

Properties

Field

Type

Comment/Sample

Methods


Method

Returns

Parameters

Parameter Types

Comments/Sample
addFontFamily()Font fontFamilyFontFamilyReturn a new Font object that adds the additional font family passed to this method. This method is used to add backup font families to the primary font.
css()StringnonenoneReturns all of the applicable CSS statements for the font family, size, style, weight, and variant on this Font object. Use this method within your .css files.

getFamily()

String

none

none

If there is one or more families assigned to this Font object, it will return the complete font-family CSS statement, otherwise an empty string is returned.
getSize()StringnonenoneIf the size is configured on the Font object, it will return the complete font-size CSS statement, otherwise an empty string is returned.
getStyle()StringnonenoneIf the style is configured on the Font object, it will return the complete font-style CSS statement, otherwise an empty string is returned.
getWeight()StringnonenoneIf the weight is configured on the Font object, it will return the complete font-weight CSS statement, otherwise an empty string is returned.
getVariant()StringnonenoneIf the variant is configured on the Font object, it will return the complete font-variant CSS statement, otherwise an empty string is returned.
inline()StringnonenoneReturns all of the applicable CSS statements for the font family, size, style, weight, and variant on this Font object. The result does not use any new line separators so this method is useful for the style attribute of an HTML element.
override()FontoverrideFontFontReturns a new Font object that is based upon the first font object with each of it's family, size, style, weight, and variant properties overridden by the Font object passed in. Make sure to assign this to a new variable within your Velocity template.
overrideSize()Font  overrideSizeStringReturns a new Font object that is based upon the current font object with the size attribute overridden by the parameter passed ni. Make sure to assign the result to a new variable within your Velocity template.
overrideStyleFont  overrideStyleStringSame as the above override method, but for the style property.
overrideWeight()Font  overrideWeightStringSame as the above override method, but for the weight property.
overrideVariant()Font  overrideVariantStringSame as the above override method, but for the variant property.

See Also

Apply a specific Font Family to a theme via CSS