object.font

Type Userdata
Object TextBox
Library native.*
Revision Release 2024.3703
Keywords native text input
See also native.newTextBox()

Overview

Gets or sets the native text box's font. May be set to a font object as returned by the native.newFont() function.

Gotchas

The font size read or written to this property may be either in Corona's content-scaled points or the platform's native points. You can determine which font size units are currently being used by querying the text box's object.isFontSizeScaled property.

By default, the font size is measured in Corona's content-scaled point system, just like display.newText(), but the default can be changed via the "isNativeTextBoxFontSizeScaled" key of display.setDefault().