Large text appears blurry

2019-02-25 12:22发布

I'm using SFML 1.6 to make a small game, and I need to display some text, so I use the sf::String class. The problem is, when I increase the size to 96pt, the edges appear a little blurry. When I increase the size of text in Microsoft Word though, it appears very clean and has crisp edges. Is there a way to do that with SFML?

1条回答
迷人小祖宗
2楼-- · 2019-02-25 12:38

Looking at the SFML sources, it appears that it is using the embedded Arial font. Yes, it can also load the .ttf font file, but I guess you didn't load it yet.

So the problem is tht SFML tries to scale the fixed-size bitmap when you are rendering the text.

To get rid of the aliasing try following this sample http://www.sfml-dev.org/tutorials/1.4/graphics-fonts.php and load the .ttf manually.

查看更多
登录 后发表回答