-- Standard text object -- font in the same folder with main.lua
local displayText = display.newText( "Hello World", 150, 80, "CoolCustomFont.ttf", 24 )
-- Standard text object -- font in a folder named "fonts"
local displayText = display.newText( "Hello World", 150, 80, "fonts/CoolCustomFont.ttf", 24 )
-- Font for native text input field
local inputText = native.newFont( "CoolCustomFont.ttf", 16 )
local textField = native.newTextField( 150, 150, 180, 30 )
textField.font = inputText
https://docs.coronalabs.com/guide/system/customFont/index.html
In my testing, using the
.tffextension in the file name does not work. It appears to only work without the extension.Windows 11
2022.3681 (2020.10.8)