Advertisement

Blitting fonts to a surface

Started by June 16, 2000 03:59 PM
2 comments, last by jumble 24 years, 6 months ago
Ok, looking through the directx SDK Font sample i notice:
quote: This sample program shows how to directly lock and access video memory, using text generated from a GDI font. There are much better ways to draw text into a DirectDrawSurface, and the only point of this sample is to show exactly how to lock and access the video memory directly.
What are the better ways? I need to write an FPS counter and score table to my almost complete tetris clone And dont worry, i''ll force all of you to play it once ive finished it /home/./~jumble ---------------
jumble-----------
You can use GDI if you don''t need speed or you can blt from a bitmap which has all the letters and symbols you want to use.
GDI is simple to use but it''s not very fast.
The bitmap technique is faster but harder to implent.
So, it''s up to up to decide if you need speed or easy programmation.

Darkening
---------------------------Unfortunately, no one can be told what a bug is.You have to see it for yourself...
Advertisement
NukeDX has a bitmap font implementation, and so do several other graphics helper libraries.

NukeDX actually allows you to create a bitmap from a True Type font at runtime (actually uses GDI just once, creating a bitmap in memory of all the letters), and uses that to draw the font characters.

http://www.nukesoftware.dk

Clay
Clay LarabieLead DeveloperTacendia.com
Thanks for the link + advice, i was wondering if it was possible to use fonts with the GD libary?
jumble-----------

This topic is closed to new replies.

Advertisement