문제

What kind of support do the PlayN or supporting libraries (like TriplePlay and others) provide in regards to non-standard fonts -- custom TrueType fonts in particular.

도움이 되었습니까?

해결책

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:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top