How to add custom font in Corona for Android?

前端 未结 2 1345
抹茶落季
抹茶落季 2020-12-21 15:03

I just tried everthing on the forums but I couldn\'t add my custom font to system. Here\'s what I have done:

I made sure that family name and font name are same with

2条回答
  •  天涯浪人
    2020-12-21 15:42

    If you are not seeing it in the Simulator, its likely you have not installed the font in Windows.

    Then you are not using the right name in your code. You don't use the .otf or .ttf inside Corona.

    local textObject = display.newText( "Hello World", 100, 100, "Alex Brush", 40 )
    

    Next, if you're building for Android, depending on the build, OTF fonts may not supported. I think OTF support was added with one of the recent daily builds, but I don't believe the last public build supports OTF.

提交回复
热议问题