PlayN Font Support

大城市里の小女人 提交于 2019-12-01 10:12:11

You have to register the font differently on each backend that you intend to use, but once the font is registered by name, you can use it like any built-in font by simply calling PlayN.graphics().createFont(name, style, size).

The HTML5 backend registers fonts using @font-face in CSS on the page that loads your game. The Android and Java backends require some code to register the font, and in the iOS backend the font must be listed in your Info.plist file.

The PlayN Showcase sample application demonstrates custom font registration for all platforms:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!