Jump to content
  • Advertisement

Archived

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

steve_-

Coding with windows fonts

This topic is 6147 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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.

Share this post


Link to post
Share on other sites
Advertisement
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
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
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!