Sign in to follow this  

Bitmap Fonts

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

In older DirectX versions, there was no D3DFont object and games used either GDI or made a BMP Font map.

Since Windows 7 doesn't support GDI hardware acceleration anymore (on alot of graphic cards atleast), (old) games using GDI to DrawText will cause extreme lag.

So some games started to use Bitmap Fonts, but my question is, are Bitmap fonts still faster to use than ID3DXFont object for drawing text? Why use Bitmap fonts anyway, it'll be quite some work to make it asian characters capable.

I'm wondering this because I've seen some DirectX8/9 tutorials where they still teach to use Bitmap Fonts.

Share this post


Link to post
Share on other sites
Quote:
Original post by ProgrammerDX
In older DirectX versions, there was no D3DFont object and games used either GDI or made a BMP Font map.

Since Windows 7 doesn't support GDI hardware acceleration anymore (on alot of graphic cards atleast), (old) games using GDI to DrawText will cause extreme lag.

So some games started to use Bitmap Fonts, but my question is, are Bitmap fonts still faster to use than ID3DXFont object for drawing text? Why use Bitmap fonts anyway, it'll be quite some work to make it asian characters capable.

I'm wondering this because I've seen some DirectX8/9 tutorials where they still teach to use Bitmap Fonts.
ID3DXFont will only render the characters with GDI the first time they're needed (Or when you call PreloadGlyphs()), so the performance impact is just a one-off hit.

Bitmap fonts are still perfectly acceptable, but if you want to support "exotic" fonts (east-asian, right to left order, and so on), there might be a lot of work involved to get it working right.

After the characters are pre-loaded, drawing text with ID3DXFont should be roughly as fast as drawing using a bitmap font (For the nitpickers; it might be slightly slower since the last time I looked ID3DXFont generated 256x256 textures for the glyphs, which means there'll probably be a lot of texture switches).

Share this post


Link to post
Share on other sites

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