How to draw smooth text in libgdx?

前端 未结 10 1278
暖寄归人
暖寄归人 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 01:04

    private BitmapFont font;
    
    font = new BitmapFont();
    
    font.scale((ppuX*0.02f));
    
    font.draw(spb, "Score:", width/2-ppuX*2f, height-0.5f*ppuY);
    
        Check out [this](http://www.badlogicgames.com/wordpress/?p=2300) blog post.
    

    ??? This just explains how to use the .scale() method which I'm stating is deprecated in the current release.

提交回复
热议问题