Interface IFont
interface IFont
Extends com.amazon.apmf.IStandard
The Interface representing a font, providing access to typeface, metrics, and transformations.
Methods
getTypeface()
Gets the typeface associated with the font.ITypeface*getTypeface()
Returns
ITypeface*
An ITypeface object representing the typeface.
getFontMetrics()
FontMetrics getFontMetrics()
Gets the metrics of the font.
Returns
FontMetrics
The font metrics FontMetrics
getFontSize()
float getFontSize()
Gets the size of the font.
Returns
float
The font size.
getSkewX()
float getSkewX()
Gets the horizontal skew factor of the font.
Returns
float
The horizontal skew factor.
setFontSize()
Sets the size of the font.voidsetFontSize(floatfontSize)
Parameters
fontSize
float — Required
The new font size.
Throws
InvalidArgumentError— if negative or zero size is passed.
setSkewX()
Sets a horizontal shear transformation to this font. The skew angle is specified in radians. A value of 0 maintains the object’s natural upright-form. Negative values slant left, while positive values slant right.voidsetSkewX(floatskewX)
Parameters
skewX
float — Required
The horizontal skew angle in radians.
setTypeface()
Sets the typeface for the font.voidsetTypeface(ITypeface*typeface)
Parameters
typeface
ITypeface* — Required
The new ITypeface object.

