Text
A text ui element to display text on the glasses screen
Each font is defined by a font slot Text length (in bytes!) is limited to the communication channel mtu-10 bytes
2 types of fonts can be used:
Stock fonts that comes pre-installed with the glasses
Custom font slots that can be created, added to the application resources and uploaded to the glasses
Custom fonts creation is in beta and documented separately Max size 32KB All custom slots are persistent, meaning uploaded fonts for those slots are kept saved on the glasses between reboots
NOTE: The behaviour of adding 2 (or more) different custom fonts with the same slot to the same screen is undefined
Supported transformations: Translate
See also
Inheritors
Constructors
Functions
Draws the ui element background
Override this function to enable custom border drawing when showBorder is true
Return the measured height of the text (getText in pixels
Return the measured width of the text (getText in pixels
Get the Font
Get the text align
Returns the resource of the UI element if exists
The getXEnd returned value is dependent on the getTextAlign as follows:
The draw method is called to actually draw the ui element visual representation to the CanvasBuffer
Enable\Disable ellipsis. Works if the Text width is defined
Set the font information
Set stock font type
Set the text align
Sets the ui element size