Sign in to follow this  

Font Manager?

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

Salutations to everyone, I didn't know where to post this topic because there are a few issues at hand. Let me give you the background... I'm working on my first engine, and it's comming along verrry nicely, but anyway, I'm currently coding my Font manager -- a class to handle the loading/caching of fonts. My engine is SDL-based, so I decided to use SDL_ttf; however, the TTF_Font structure has to store a new instance for each font, size, and face combination. So obviously, the more flexibility I give to my engine, the more ram it's going to use. My questions are: 1. Are there any other good font libraries for SDL that are a little more general in storing loaded fonts? 2. What are some ways I can/should cut back on ram? (e.g. Only provide users with 3 font sizes (small, medium, and large), garbage collect unused fonts, etc.)

Share this post


Link to post
Share on other sites
Do the created fonts really take up that much space?

Eh, either way, having reference counted resources [including fonts] is pretty standard, and should help a bit with keeping the footprint down.

Share this post


Link to post
Share on other sites
doing the nearly the same thing last night.

as a stop gap solution i have a few common sized fonts hanging around(statically allocated) and a TTF_Font * thats stores the most recently used non - standard size.




really depends on your fonting needs - my needs are basic...

Share this post


Link to post
Share on other sites

This topic is 4487 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.

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