Archived

This topic is now archived and is closed to further replies.

steve_-

Coding with windows fonts

Recommended Posts

steve_-    122
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.

Share this post


Link to post
Share on other sites
Dean Harding    546
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.



codeka.com - Just click it.

Share this post


Link to post
Share on other sites
steve_-    122
Thanks,

I saw something with b-splines in FR-11 (Farb-Rausch), it''s a demo with source. But since I don''t know enough about this stuff, I guess I''ll stick with the DC''s.

Steve

Share this post


Link to post
Share on other sites
Brannon    122
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.


-Brannon

Share this post


Link to post
Share on other sites