大文字显得模糊 [英] Large text appears blurry

查看:150
本文介绍了大文字显得模糊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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.

要消除别名,请尝试遵循以下示例 http://www.sfml-dev.org/tutorials/1.4/graphics-fonts.php 并手动加载.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.

这篇关于大文字显得模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆