How to draw the outline of text characters
by Nabarro · in Torque 3D Professional · 07/26/2010 (4:55 am) · 4 replies
As title, we want to draw the text characters outline to make them look clearer, how to do that? Anyone have any ideas?
Thank you very much.
Thank you very much.
#2
07/26/2010 (1:01 pm)
It's not an elegant solution, but it works: render the same text 8 times using the outline color and a different offset for each time (up, up-right, right, down right, etc), and then drawing the normal text on top of it. It's a simple source code change, but you need to change each control where you want to support outlined text.
#3
Find an free/bought outlined font.
Use it in your application.
Distribute the UFT.
But than again, I'm a slacker -prefering not to tamper with gFont and have it do the rendering/altering.
07/26/2010 (1:33 pm)
The most simple 'tweak' I can think off, as the engine use UFT of every used charset, is to simply;Find an free/bought outlined font.
Use it in your application.
Distribute the UFT.
But than again, I'm a slacker -prefering not to tamper with gFont and have it do the rendering/altering.
#4
Using the offset trick doesn't needs changes into gFont: you can do it directly in the GUI classes by calling drawText() a few more times (though it can be done in a less ugly way).
07/26/2010 (8:11 pm)
@Christian: an outlined font doesn't solve the problem because such fonts are "hollowed" out. When doing real outlining one ideally wants control over the fill and outline colors.Using the offset trick doesn't needs changes into gFont: you can do it directly in the GUI classes by calling drawText() a few more times (though it can be done in a less ugly way).
Torque 3D Owner Cai Yundong