Jump to content
  • Advertisement
Sign in to follow this  
jdub

[SlimDX]Question about drawing fonts

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

I am writing a Font Drawing class for my game. My class works like this: I call FontHelper.Draw(String text) to draw text on to the screen. If I want to say change the size, position or color of my text, I change the FontHelper.Settings property before I call Draw(). Draw() records the current Settings property and text into a list. At the end of all Draw() calls, I call FontHelper.Render() which draws all of the text that was recorded into the list with each piece of text's settings (Position, Color, Size, etc.) Now my question is this: From looking at SlimDX's font class, I can see that the Description Property is readonly. This means that I will have to create a new Font every time I change the color, or make text italic. Is there a way to get around creating a new Font every time I change the Color or size of my text?

Share this post


Link to post
Share on other sites
Advertisement
I may be wrong, but I think that this is basically inherent to how the font system works, being built on top of Windows' font system. You can probably get away with changing the colors via shader, but you can't do much about the bold/italic stuff.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!