Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ITextStyle

interface ITextStyle
Extends com.amazon.apmf.IStandard interface which defines set of styles that can be applied to the text such as font size, color etc.

Methods

getColor()

Color getColor()
Returns the color setting of the text.

Returns

Color The color object.

getFontSize()

float getFontSize()
Returns the font size of the text as a floating-point value.

Returns

float The font size as a float.

getFontScale()

float getFontScale()
Returns the font scale of the text as a floating-point value.

Returns

float The font scale as a float.

getFontStyle()

IFontStyle* getFontStyle()
Returns the font style setting of the text.

Returns

IFontStyle* The font style object.

getLetterSpacing()

float getLetterSpacing()
Returns the spacing between each letter

Returns

float The letter spacing as a float.

getWordSpacing()

float getWordSpacing()
Returns the spacing between each word

Returns

float The words spacing as a float.

getLineHeight()

float getLineHeight()
Returns the line height as a multiplier of the font size. A value of 0.0 indicates that no explicit line height has been set by the caller, and the rendering engine will use the font’s intrinsic line height.

Returns

float The line height multiplier as a float.

getTextDecoration()

TextDecoration getTextDecoration()
Returns the text decoration setting.

Returns

TextDecoration The text decoration as a TextDecoration enumeration.

getTextDecorationStyle()

TextDecorationStyle getTextDecorationStyle()
Returns the style setting for text decoration line.

Returns

TextDecorationStyle The style setting for text decoration line as a TextDecorationStyle enumeration.

isSuperscript()

bool isSuperscript()
Returns a boolean value indicating whether superscript formatting is currently enabled for the text.

Returns

bool true if superscript formatting is enabled, false otherwise.

isSubscript()

bool isSubscript()
Returns a boolean value indicating whether subscript formatting is currently enabled for the text.

Returns

bool true if subscript formatting is enabled, false otherwise.

getFontFamilies()

string[] getFontFamilies()
This function returns an array of strings, where each string represents a font family available to use.

Returns

string[] An array of font family names.
Last modified on October 29, 2026