OpenGL Clear Readable Text
Hi, I am trying to come up with a text rendering solution that is clear and readable in most situations.
One of the solutions I have noticed is that people render each letter in whatever colour they prefer, and give it a black border. This seems to work well for most light backgrounds, and i imagine it will remain so by using a white outline on dark backgrounds.
I am trying to find out what the best way of implementing something like this is. I have looked at nehe''s tutorials and they are a great starting point.
Does anyone have any other ideas on how to render clear readable text? Is antialising an option? Perhaps rendering normal text on a faded background?
All suggestions welcome,
Nimo
Hey I watch too many Japanese Animes and asian movies. I''ve seen the best and the worst subtitles. I find two techniques to be good.
First is to have a contrast in the color of text and background. But this is not an option for a user interface. Let''s face it, you don''t want pink letter on a horror type game. But this works fine in movies or animes. For example, yellow subtitles on a white background is fine.
Second is to have a color for the text and have a different colored border arround each letter. Now the border can be as apperent as you wish it to be and as much of a contrast you wish.
So that was my non programming approach. Hope it helps.
First is to have a contrast in the color of text and background. But this is not an option for a user interface. Let''s face it, you don''t want pink letter on a horror type game. But this works fine in movies or animes. For example, yellow subtitles on a white background is fine.
Second is to have a color for the text and have a different colored border arround each letter. Now the border can be as apperent as you wish it to be and as much of a contrast you wish.
So that was my non programming approach. Hope it helps.
quote:
Original post by BrownBean
Second is to have a color for the text and have a different colored border arround each letter. Now the border can be as apperent as you wish it to be and as much of a contrast you wish.
I think I like the idea of this method more than the other. I have a feeling it would look more ''professional''. I would appreciate any ideas on actually implementing something like this. I have some ideas, but I don''t think they would be very fast, and I am sure it is something that someone else has done before.
cheers,
Nimo
use a texture as font simply generate the texture with one of the nice programs on the web (for example search for disasteroids 3d in google, on the page of this game you''ll find one proggy wich is cool)
create two textures at best, one with bigger font than the other..
then open it in some photoshop, open the image with the bigger font, set the fontcolor to the bordercolor you want, and put the smaller font over it with transparency.. so you get the font you want..
how to use it? you''ll find enough info on nehe.gamedev.net.
create two textures at best, one with bigger font than the other..
then open it in some photoshop, open the image with the bigger font, set the fontcolor to the bordercolor you want, and put the smaller font over it with transparency.. so you get the font you want..
how to use it? you''ll find enough info on nehe.gamedev.net.
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
actualy you can do this stuff at runtime. load font texture to 24bit(RGB) format. you can do this from TGA font texture (like NeHe''s) or create it from TTF on runtime. then create alpha layer from this RGB. Now use gaussian blur on alpha cnanel and use alpha blending to draw text. this should put some thin black border around white fonts. this text looks good on white or black background.
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement