Creating outlined text!
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!
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)
--- krez (krezisback@aol.com)
I was thinking about that also, but wouldn''t that be slow ?
Jason Arora
jason@pubism.com
http://www.pubism.com
Jason Arora
jason@pubism.com
http://www.pubism.com
I think so too ... But surely there must be a way of doing this using the normal text output functions ...
CD3DFont in the SDK - you can easily do something similar with either your own bitmap or two passes with 2 different fonts.
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
dave
--
david@neonstar.net
neonstar entertainment
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
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)
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)
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)
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)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement