Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
develephant opened this issue Oct 12, 2022 · 0 comments
Open

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

develephant opened this issue Oct 12, 2022 · 0 comments

Comments

@develephant
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant