Jump to content
  • Advertisement

Archived

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

Darkmoon

Creating outlined text!

This topic is 6067 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

Hey ... I''ve been looking around the net like crazy for info on how to do outlined text. And with that, I mean using the DirectX text routines or what not, to make ... e.g white text with black outline around it. Commonly seen on PSX/PS2 / N64 games ... Heeelp!

Share this post


Link to post
Share on other sites
Advertisement
you could use bitmapped fonts... that is, draw your outlined characters in a bitmap, and then blt the individual letters to the screen... this doesn''t allow for pretty scaling, but if you only need one or two sized fonts it''d be ok.

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
I was thinking about that also, but wouldn''t that be slow ?

Jason Arora
jason@pubism.com
http://www.pubism.com

Share this post


Link to post
Share on other sites
Blitting a bitmap font would not be slow. That method is what you see when you see the outlined text on N64 or PS2 games. Another method is like the other guy said, to blit out the text in black, and then blit out the text in white on top of it, but a little smaller so the black will show around it.

dave


--
david@neonstar.net
neonstar entertainment

Share this post


Link to post
Share on other sites
Its not exactly outlines, but you can get a good shadow effect that makes text more readable by blitting black text at x,y, then white text at x-1,y-1

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
mhm ... ''kay.

Now for my second question. I''ve never worked with bitmapped fonts ;p .. anyone able to help me out there? Each char would have a fixed width and height on the map, right? So you read that certain area, and mask_blit it, right? But how is the lookup done (Efficiently)

Share this post


Link to post
Share on other sites
just draw the bitmapped font in ASCII order, so the ASCII value of each character is also the index of that character in the bitmap.
as far as fixed-widthness goes, that''s how i have done it... but i suppose you could make them variable-widthed. you''d have to keep track of the whole rect for each character in a lookup table then, though, instead of just multiplying the offset by the index.

--- krez (krezisback@aol.com)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!