Jump to content
  • Advertisement
Sign in to follow this  
kosmon_x

ID3DXFont resolution problems

This topic is 4889 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

Hi, I'm having trouble with my text scaling along with resolution changes in windowed mode. The text that I draw scales fine when I perform a resolution change in fullscreen mode, but it stays the same size when I do a resolution change in Windowed mode. (Ie, the height of the text is the same whether the window is 1024x768 or 100x100). Anyone ever run into this problem, or know of a solution? Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
Changing fullscreen resolution results in having a smaller or larger display. Pixels become smaller or larger, so it makes sense that sprites will change sizes. However, in window mode, your view relative to the sprites is not changing. One pixel is still one pixel, and nothing should change size.

Are you referring to something else?

Share this post


Link to post
Share on other sites
Well, perhaps what I want is for the font to shrink/expand at the same ratio as the rest of my scene. For instance, if I have a box rendered, the box will resize along with the window, however, the font will not. How can I get the font to resize along with the window as well?

Share this post


Link to post
Share on other sites
The fonts shouldn't expand or shrink with your scene when changing resolutions. If you use a smaller screen size, the size relationship between fonts and 3D objects is (should be) exactly the same as using a small window. The size of the font will remain constant relative to the screen with a window, but not relative to your scene objects. In other words, using a 320x240 window should result in size relationships between fonts and 3D objects that exactly match a full-screen resolution of 320x240. The fonts are huge, yet the 3D objects are basically the same size, just pixelated.

The only two ways I know to accomplish this is to use different font sizes or use a transform for the sprite class to scale them down.

Share this post


Link to post
Share on other sites
Ah transform the sprite class.. that's exactly the kind of thinking I needed :) Thank you -- that should work perfectly.

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!