How to draw smooth text in libgdx?

前端 未结 10 1276
暖寄归人
暖寄归人 2020-12-01 00:01

I try to draw simple text in my android game on libgdx, but it\'s look sharp. How to make text look smooth in different resolutions? My Code:



        
10条回答
  •  情歌与酒
    2020-12-01 00:50

    You should definitly have a quick look on custom font shaders and/or DistanceField-Fonts. They're easy to understand and similarly easy to implement:

    https://github.com/libgdx/libgdx/wiki/Distance-field-fonts

    DistanceFieldFonts stay smooth, even when you upscale them:

    enter image description here

提交回复
热议问题