Sign in to follow this  
jdub

[SlimDX]Question about drawing fonts

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this