Large text appears blurry

青春壹個敷衍的年華 提交于 2019-12-20 02:37:26

问题


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:


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.



来源:https://stackoverflow.com/questions/10707083/large-text-appears-blurry

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!