General discussion

Locked

Bitmap for different type and size fonts

By CitizenSoldier ·
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)

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Bitmap for different type and size fonts

by tau In reply to Bitmap for different type ...

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

Collapse -

Bitmap for different type and size fonts

by CitizenSoldier In reply to Bitmap for different type ...

I need to do this programatically not manually

Collapse -

Bitmap for different type and size fonts

http://www.devx.com/free/mgznarch/vbpj/code/1999/07jul99/vbpj0799ap_p.zip

Check out the TextOutline code in particular...looked helpful anyway.

Collapse -

Bitmap for different type and size fonts

by CitizenSoldier In reply to Bitmap for different type ...

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)

Collapse -

Bitmap for different type and size fonts

by CitizenSoldier In reply to Bitmap for different type ...

This question was closed by the author

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Forums