Skip to main content
gamedev.net
🔒 Locked

Coding with windows fonts

Started by steve_- Dec 15, 2001 at 11:31 AM 2 replies 350+ views
Original Post
steve_-
steve_-
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.
Dean Harding
Dean Harding
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.
steve_-
steve_-
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
Brannon
Brannon
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
-Brannon

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.