Jump to content
  • Advertisement
Sign in to follow this  
Stormtrooper

Fuzzy Text?

This topic is 3738 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Any idea why the font is fuzzy? I'm using SlimDX with these settings sprite - alphablended | sort texture height: 15 width: 0 weight: normal mip level: 0 italic: false char set: default precision: default font quality: default pitch and family: default | don't care face name: arial EDIT: I want it to not be antialiased. I tried fontquality.nonantialias but that didn't change anything at all.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Lexdysic
If you are using Windows, Is the ClearType font smoothing on?


I don't know what that is, but I don't think so. Text doesn't look like that normally.

Share this post


Link to post
Share on other sites
I have this trouble with the free fonts that Microsoft developed for XNA. I don't have the problem with the built in fonts like Verdana though.

Share this post


Link to post
Share on other sites
Might want to try it with it on and off. It changes the way fonts are drawn on a system. It will smooth out the edges of the fonts so that it might make it easier to see on certain displays.

You can get to the option by going to the Appearance tab of the Display Properties page. Then click on the Effects button. On the window that opens you will find a check box for smoothing fonts with a dropdown box below it with either Standard smoothing or ClearType smoothing.

Share this post


Link to post
Share on other sites
Quote:
Original post by BLiTZWiNG
I have this trouble with the free fonts that Microsoft developed for XNA. I don't have the problem with the built in fonts like Verdana though.


I tried Verdana...same thing. It looks as if the font quality doesn't do anything. I want no AA and want the text sharp.

Share this post


Link to post
Share on other sites
I've never really used the Font interface much, but this kind of blurriness is often caused by misaligning your pixel and texel grids. What coordinates are you drawing to? In D3D9 you need to offset integer coordinates (as per this, but in D3D10 you need to not perform said offsetting).

I don't recall if the font interface will do this offsetting internally or not, so that may be something to consider.

Share this post


Link to post
Share on other sites
The Text3D example in the SDK displays everything exactly how I want it, and I'm pretty sure they didn't do anything different than what I did. So I'm assuming either I have no idea how DirectX works and I've set something up wrong, or something is weird between directx9 and slimdx. Also, I can't use shaders because I can't seem to get shaders to work at all.

Share this post


Link to post
Share on other sites
I'm not sure that the font interface will have a problem with texel-pixel conversions. It takes ints to locate the text. I am fairly certain that under the hood, the font interface just uses DCs and window's font drawing calls.

Share this post


Link to post
Share on other sites
Quote:

I'm not sure that the font interface will have a problem with texel-pixel conversions. It takes ints to locate the text. I am fairly certain that under the hood, the font interface just uses DCs and window's font drawing calls.

It uses those to generate the texture, most likely. But it submits geometry to D3D bound to that texture; it's that geometry that must be offset. If the exposed interface takes integers, however, that's probably a good indication it will handle the offset.

Quote:

The Text3D example in the SDK displays everything exactly how I want it, and I'm pretty sure they didn't do anything different than what I did.

Is there anything else that you render that looks slightly off? Does your projection matrix -- particularly the aspect ratio -- match your window? You need to make sure you use the window's client rectangle for this, not the size you specify in the CreateWindow call (or equivalent).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!