Discussion Locked

Bitmap for different type and size fonts

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Given a window font (Verdana, Tahoma, etc) of certain type (truetype or opentype) and size (10 pt, 16 pt, etc) how can I obtain the bitmap of its characters (or more accurately the glyphs)?

I am working on an application in VB that will write text and graphics to a 6 ft wide X 2 ft high LED array message board via serial port. The LED resolution on the board is 64 LEDs/sq. in. (8x8 array)

5 replies

by tau

Press Print Screen when you see the character you want, which will copy the whole screen to clipbard, and use Paint to recover it.

by citizensoldier

I figured out by doing some more research on the internet. The answer is actually fairly simple: Use CreateCompatibleDC to create a device context. Use CreateCompatibleBitmap to make a bitmap. Use SelectObject to make the device context use the bitmap. Finally, draw on the device context using the specified font. The resultant bitmap can be saved in various formats (bmp, gif, etc)

This discussion is closed to new replies.