Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-22-2011, 01:23 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Scripting Request: Text Outlines

Similar to textshadows, it would be incredibly nice if we could outline text.

I imagine it could work like so:
PHP Code:
with (findimg(100)) {
  
this.text "Hello";

  
this.textoutline true// enable text outlines
  
this.outlinethickness 2// 2 pixel outline
  
this.outlinecolor = {000255}; // text outline color

Example:
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #2  
Old 07-22-2011, 01:25 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
From March:

Quote:
Originally Posted by Stefan View Post
Outline colors is quite complex, because we couldn't re-use the same texture for different colored texts. Black and white could work but other things are complex. Often programs just draw with a bigger font behind the current text. So it is possible but will probably not be added very soon.
__________________
Reply With Quote
  #3  
Old 07-22-2011, 01:27 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by cbk1994 View Post
From March:
That makes me sad, but it was expected because I can't imagine outlining being very easy to add.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #4  
Old 07-22-2011, 01:28 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Lack of text outlines means no decent looking text in some instances
Reply With Quote
  #5  
Old 07-22-2011, 01:29 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by DustyPorViva View Post
Lack of text outlines means no decent looking text in some instances
I'm afraid I agree entirely.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #6  
Old 07-22-2011, 02:23 AM
blader2007_p2p blader2007_p2p is offline
Banned
Join Date: Apr 2006
Posts: 25
blader2007_p2p is on a distinguished road
Yeah it'd be nice to see on Graal. While you're at it, it would be really nice to see it being possible to add actual shading to text, imagery or GUI windows.

Example:


As for the outline, you should also be able to choose to either draw the outline outside of the text, inside of the text and on top of the border.

Example:
Reply With Quote
  #7  
Old 07-22-2011, 10:01 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I'm using a customized function that will create eight TShowImg objects using the same text and different shadow offsets to get an outline to it. Not the best way to do it, but then again, I'm not using it often.
Reply With Quote
  #8  
Old 07-22-2011, 07:08 PM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
Would benefit me because I wouldn't have to look at the ugly text that many servers seem to use.
Reply With Quote
  #9  
Old 07-22-2011, 07:32 PM
BigBear3 BigBear3 is offline
Zormite
BigBear3's Avatar
Join Date: Jan 2007
Location: Lynn, MA
Posts: 2,551
BigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond reputeBigBear3 has a reputation beyond repute
Would be awesome
Reply With Quote
  #10  
Old 07-22-2011, 09:37 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
PHP Code:
for (i=0;i<4;i++) {
  
//Create child text controls at vecx(i), vecy(i) with the desired outline color.

Probably the best you'll be able to get for a long time.
Reply With Quote
  #11  
Old 07-22-2011, 09:41 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Hezzy002 View Post
PHP Code:
for (i=0;i<4;i++) {
  
//Create child text controls at vecx(i), vecy(i) with the desired outline color.

Probably the best you'll be able to get for a long time.
You'd actually need 8, and it's not the most flexible method around. Also, text isn't really the fastest thing to render, so it's not very desirable(especially for say, nick names or chat text).
Reply With Quote
  #12  
Old 07-23-2011, 06:16 AM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Quote:
Originally Posted by DustyPorViva View Post
You'd actually need 8, and it's not the most flexible method around. Also, text isn't really the fastest thing to render, so it's not very desirable(especially for say, nick names or chat text).
For a one-pixel (or even two, if you don't mind the small artifact on the corners) sized outline, four would suffice. Anything more than one pixel usually looks like ass (in my opinion) anyway. Could you somehow cache it in a texture using a TDrawingPanel?
Reply With Quote
  #13  
Old 07-23-2011, 06:19 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Hezzy002 View Post
For a one-pixel (or even two, if you don't mind the small artifact on the corners) sized outline, four would suffice. Anything more than one pixel usually looks like ass (in my opinion) anyway. Could you somehow cache it in a texture using a TDrawingPanel?
The corners would kind of bug the hell out of me.

Don't think you can draw text to the DrawingPanel(might be able to in v6) but I doubt you'd get much of a performance boost, at least not for active stuff like chat. It's too taxing to constantly draw to one every frame.
Reply With Quote
  #14  
Old 07-23-2011, 01:18 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Here's a sample:


The first two ones use only four text controls. First one is adding shadows at top, left, bottom and right, second one is adding them at top left, bottom left, bottom right, top right. Third one has them all.
Reply With Quote
  #15  
Old 07-23-2011, 01:52 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Crow View Post
Here's a sample:


The first two ones use only four text controls. First one is adding shadows at top, left, bottom and right, second one is adding them at top left, bottom left, bottom right, top right. Third one has them all.
First one looks best
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.