Bitmap Fonts

Started by
1 comment, last by Dawoodoz 13 years, 6 months ago
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.
Advertisement
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).
I prefer bitmap fonts anyway because a bitmap font can have emoticons and anything else needed for multiplayer chatting.

This topic is closed to new replies.

Advertisement