Skip to content

Documentation: customFont extension not used for loading fonts. #119

Description

@develephant

https://docs.coronalabs.com/guide/system/customFont/index.html

-- 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

In my testing, using the .tff extension in the file name does not work. It appears to only work without the extension.

Windows 11
2022.3681 (2020.10.8)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions