问题描述
我正在使用SFML 1.6制作小型游戏,并且需要显示一些文本,因此我使用 sf :: String
类。问题是,当我将尺寸增加到96pt时,边缘看起来有点模糊。但是,当我增加Microsoft Word中的文本大小时,它看起来非常干净并且边缘清晰。有没有办法用SFML做到这一点?
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?
推荐答案
看SFML源,看来它正在使用嵌入式Arial。字体。是的,它也可以加载.ttf字体文件,但是我想您尚未加载它。
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.
所以问题是SFML尝试缩放固定的字体,
So the problem is tht SFML tries to scale the fixed-size bitmap when you are rendering the text.
要消除别名,请尝试遵循以下示例并手动加载.ttf。
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.
这篇关于大文字显得模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!