Type Userdata
Object TextField
Library native.*
Revision Current Public Release (2018.3326)
Keywords native text input
See also object:resizeFontToFitHeight()


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


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 field'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 "isNativeTextFieldFontSizeScaled" key of display.setDefault().


local myField = native.newTextField( 10, 30, 180, 30 )
myField.font = native.newFont( native.systemFontBold, 18 )