Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Scripting Request: Text Outlines (https://forums.graalonline.com/forums/showthread.php?t=134263974)

Tigairius 07-22-2011 01:23 AM

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:
http://i.imgur.com/bcD7t.png

cbk1994 07-22-2011 01:25 AM

From March:

Quote:

Originally Posted by Stefan (Post 1636204)
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.


Tigairius 07-22-2011 01:27 AM

Quote:

Originally Posted by cbk1994 (Post 1659724)
From March:

That makes me sad, but it was expected because I can't imagine outlining being very easy to add.

DustyPorViva 07-22-2011 01:28 AM

Lack of text outlines means no decent looking text in some instances :(

Tigairius 07-22-2011 01:29 AM

Quote:

Originally Posted by DustyPorViva (Post 1659727)
Lack of text outlines means no decent looking text in some instances :(

I'm afraid I agree entirely.

blader2007_p2p 07-22-2011 02:23 AM

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:
http://i1206.photobucket.com/albums/...extshading.png

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:
http://i1206.photobucket.com/albums/...xtoutlines.png

Crow 07-22-2011 10:01 AM

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.

MattKan 07-22-2011 07:08 PM

Would benefit me because I wouldn't have to look at the ugly text that many servers seem to use.

BigBear3 07-22-2011 07:32 PM

Would be awesome :(

Hezzy002 07-22-2011 09:37 PM

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.

DustyPorViva 07-22-2011 09:41 PM

Quote:

Originally Posted by Hezzy002 (Post 1659855)
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).

Hezzy002 07-23-2011 06:16 AM

Quote:

Originally Posted by DustyPorViva (Post 1659856)
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?

DustyPorViva 07-23-2011 06:19 AM

Quote:

Originally Posted by Hezzy002 (Post 1659953)
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.

Crow 07-23-2011 01:18 PM

Here's a sample:
http://images.crategames.net/uploads...netext1513.png

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.

xXziroXx 07-23-2011 01:52 PM

Quote:

Originally Posted by Crow (Post 1659981)
Here's a sample:
http://images.crategames.net/uploads...netext1513.png

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 :oo:

Crow 07-23-2011 01:57 PM

Quote:

Originally Posted by xXziroXx (Post 1659982)
First one looks best :oo:

It really depends on what you want the outcome to look like. The first method will make angular fonts more round (using Arial in this example), which is an undesired effect sometimes. Second one doesn't look too bad, compared to the third one, and should work well on smaller sizes.

Tigairius 07-23-2011 08:42 PM

Quote:

Originally Posted by Crow (Post 1659981)
Here's a sample:
http://images.crategames.net/uploads...netext1513.png

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.

Even if Stefan only added something like outlinetext = true; where we couldn't specify thickness, it would be better than nothing.

Crow 07-23-2011 08:49 PM

Quote:

Originally Posted by Tigairius (Post 1660005)
Even if Stefan only added something like outlinetext = true; where we couldn't specify thickness, it would be better than nothing.

Aye.

Unkownsoldier 07-26-2011 05:01 AM

What exactly are you trying to accomplish with outline text? In what event would it be used? If it was pretty much anything but player-chat text, couldn't you just make an image? and use that instead? Of course it would be annoying, but good things take work.

DustyPorViva 07-26-2011 05:33 AM

Quote:

Originally Posted by Unkownsoldier (Post 1660342)
What exactly are you trying to accomplish with outline text? In what event would it be used? If it was pretty much anything but player-chat text, couldn't you just make an image? and use that instead? Of course it would be annoying, but good things take work.

Increases readability of text ten-fold and also looks way better than naked text.


All times are GMT +2. The time now is 01:10 AM.

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