Recommended Posts

Hi,
I want to make some effects with particles. One of the effects is particle letters, which explode or something like that. For that I need to get the dimensions of a font so I know where to put the particles, I can do it with an extra bitmap and read out the stuff. But I want to keep things as small as possible. I know only very little about MFC or other windows-code stuff (I''m a freebsd guy). I thought of drawing it to a DC first and read it out again, but I think there are better ways... Can anybody give me any hints (don''t say "look at msdn", please and C or C++ would be nice, not necessary though)?
Thx,
Steve
PS
Sorry for my awful english.

0

Share this post

Link to post

Share on other sites

I think drawing the character to a DC and the using that to work out the positions is probably the easiest way. Using a TypeType library, you could probably extract the B-Spline edges of the font and work from there. But that''d be far more difficult, and not much more flexible. I mean, if you want a higher resolution, then you just increase the size of your DC.

Share this post

Link to post

Share on other sites

You can always try out the FreeType2 library (www.freetype.org). It will render glyphs into a bitmap (not a DC), that you can then examine. I believe you can also get at much more detailed info for the typeface, but I haven''t played with that yet.