Scaling of bitmap fonts
Moderators: CEGUI MVP, CEGUI Team
Scaling of bitmap fonts
I'm wondering if there's a way to apply scaling for bitmap fonts. We have a high res bitmap font and would like to down sample for lower sizes of the same font, both to save texture space, but first and foremost to save time.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Scaling of bitmap fonts
Hi,
Well, in theory it's possible because the font member functions have a 'scale' argument, however in practice this is not exposed in the upper layers of the system
If it were possible to share the bitmap imageset between fonts (which it might be in 0.7.x, though if it does work you need to be very, very careful), you may be able to achieve a desired result via manipulation of the font native resolution. Note that this is very hairy stuff indeed; it's not something I've ever tried, so it may not work at all, but it might be worth a try
CE.
Well, in theory it's possible because the font member functions have a 'scale' argument, however in practice this is not exposed in the upper layers of the system
If it were possible to share the bitmap imageset between fonts (which it might be in 0.7.x, though if it does work you need to be very, very careful), you may be able to achieve a desired result via manipulation of the font native resolution. Note that this is very hairy stuff indeed; it's not something I've ever tried, so it may not work at all, but it might be worth a try
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Scaling of bitmap fonts
It was rather easy to implement by looking at all the instances where auto scaling was used for fonts, just slapped a scaling factor right on and exposed it to the xml handler. Seems to work nicely
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Scaling of bitmap fonts
Great stuff
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: No registered users and 12 guests