Font SFO
Properties
Field | Type | Comment/Sample |
---|
Methods
Method | Returns | Parameters | Parameter Types | Comments/Sample |
---|---|---|---|---|
addFontFamily() | Font | fontFamily | FontFamily | Return 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() | String | none | none | Returns 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. |
|
|
|
| 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() | String | none | none | If the size is configured on the Font object, it will return the complete font-size CSS statement, otherwise an empty string is returned. |
getStyle() | String | none | none | If the style is configured on the Font object, it will return the complete font-style CSS statement, otherwise an empty string is returned. |
getWeight() | String | none | none | If the weight is configured on the Font object, it will return the complete font-weight CSS statement, otherwise an empty string is returned. |
getVariant() | String | none | none | If the variant is configured on the Font object, it will return the complete font-variant CSS statement, otherwise an empty string is returned. |
inline() | String | none | none | Returns 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() | Font | overrideFont | Font | Returns 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  | overrideSize | String | Returns 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. |
overrideStyle | Font  | overrideStyle | String | Same as the above override method, but for the style property. |
overrideWeight() | Font  | overrideWeight | String | Same as the above override method, but for the weight property. |
overrideVariant() | Font  | overrideVariant | String | Same as the above override method, but for the variant property. |