Roxen: The Graphical Text Tags.

General

The gtext tag first parse the contents of the tag, before any rendering is done.

It is therefore possible to make, as an example, quite nifty access counters, if you are into that kind of things.

Attributes:

bg=color
Sets the background color. Normally taken from the normal HTML tags in your document (Currently: body, table, tr or td).

If you set the background color, it is probably best to add the notrans attribute as well.

Pink red %50,0,100,0

fg=color
Sets the text color,

nfont="font name"
Select a font using somewhat more memonic font-names. You can get a font-list by accessing the configuration interface.

there are several modifiers available: bold, italic, black and light.

If the requested version of the font is available, it will be used to render the text, otherwise the closest match will be used.

Examples, using futura:

Light Italic
Normal Italic
Bold Italic
Black Italic

scale=number
Sets the scale of the image. Larger than 1.0 is enlargement.

<gtext scale=1.0> <gtext scale=0.5>

2 3 4 5 6 or 7
Short for scale=num, where num is 1.0/([the argument]*0.6)

<gtext 2> <gtext 3> <gtext 4>

notrans
Do not make the background transparent. Useful when making 'boxes' of color around the text. <gtext bg=red> <gtext bg=red notrans>

crop
Remove all white-space around the image

split
Make each word into a separate gif image. Useful if you are writing a large text, and word wrap at the edges of the display is desired. This text is an example (try resisizing your browser window, the images should move just like normal text would)

href=url
Adds an normal <a href=url> around the image. Will also cause the image to be rendered in the 'link' color per default, instead of the 'text' color.

a link to this document

quant=number_of_colors
Quantifies the image with this number of colors. The default is set in the configuration interface. Normaly around 32. Using a lower number will decrease the image (file)size, but make the text look more 'edgy', and if you use complex backgrounds or image textures, more colors will be neded. At most 255 colors can be used, and less than 2 is quite useless.
200 colors
20 colors
6 colors
2 colors

magic=[message]
Modifier to href, more flashy links. Does not work with 'split'. Uses the 'alink' color for the highlighting.

a link to this document

fuzz[=color,amount]
Apply the 'glow' effect to the highlighted image, a modifier for the 'magic' argument. The defaults are black and 1, increasing the 'amount' argument will dramatically increase the computation time.

a link to this document

fs
Apply a floyd-steinberg dithering to the result. Most of the time it is much better to increase the number of colors, instead of dithering the image, but sometimes when using very complex background images dithering is O.K.

border=width,color
Draw a border around the image.
Red border

spacing=spacing
Add this amount of spacing around the text
Spacing=10

xspacing=spacing
Add this amount of spacing to the left and right of the text
Xspacing=20

yspacing=spacing
Add this amount of spacing above and below the text
Yspacing=10

size=xsize[,ysize]
Set the size of the image, before any scaling is done. If the image is smaller than the text size, the text will be croped to fit on the right and bottom sides. Same goes for any background image specified. If only one the xsize is specified, the ysize will be set to the same value.

100x100 100x20

xsize=xsize, ysize=ysize
Sets the xsize, and/or the ysize. If one of the two is _not_ specified, it is set the the smallest value that will fit the image, or the size of the background image, if one is selected, just like it is normally. Otherwise just like 'size=xsize,ysize'

bevel=width
Draws a bevel-box around the text.
3 pixel bevel-box

pressed
A modifier to 'bevel', draws the bevel as if it was pressed down.
3 pixel bevel-box

The magic modifier will do this automatically, like this:
3 pixel bevel-box

talign=dir
Sets the text-align to either left, right or center.
Left justificated text Center justificated text Right justificated text

textbox=opaque%[,color[,pad]]
Draw an (optionally transparent) box below the text. Pad defaults to '0', and is the distance from the edges of the text to the end of the box. A negative pad works. <gtext textbox=100,pink>
<gtext textbox=50,pink>
<gtext textbox=100,red,-20>

xpad=Xpad%
Increase padding between characters with Xpad%. A negative '%' value works.

<gtext xpad=-30%>
<gtext xpad=-10%>
<gtext>
<gtext xpad=10%>
<gtext xpad=30%>

ypad=Ypad%
Just like xpad, but in increases and decreases the distance between the lines.

opaque=opaque%
Sets the 'opaque' value of the color used to draw the text. In the example below, notice how the text color mixes with the two background colors (light blue and pink :-)

<gtext textbox=100,pink,-11 bg=lightblue notrans opaque=40>

shadow=white-mix[,distance]
Draw a black drop-shadow behind the text. Using 0 as distance does not currently place the shadow directly below the text. Using negative values for distance is possible, but you might be forced to add 'spacing' to render the text correctly.

<gtext shadow=40,0>
<gtext shadow=40,2>

bshadow=distance Draw a blured black drop-shadow behind the text. Using 0 as distance does not currently place the shadow directly below the text. Using negative values for distance is possible, but you might have to add 'spacing'.

<gtext quant=100 bshadow=1>
<gtext quant=100 bshadow=2>

ghost=distance,blurfactor,color

Do a 'ghost text'. Magic coloring won't work with it
ghost=1,1,red
ghost=1,3,blue
ghost=-1,1,yellow opaque=90 bshadow=1

glow=color,amount
Apply a 'glow' filter to the image. Quite a CPU eater. Looks much better on a dark background, where a real 'glow' effect can be achieved.

<gtext glow=red>

rotate=angle[,color]
Rotate the whole thing angle degrees. Fill the newly created space with the specified color.

-90 degrees 20 degrees, no color -20 degrees, pink

background=filename
Use the specified file as a background image. Currently only PPM images are supported. The whole filename of the file must be specified. The filename is the real filename of the file, the virtual filesystem in roxen is not used.

Black text on a sky background

texture=filename
Use the specified file as the texture of the text

Wood

turbulence=frequency,color;freq,col;freq,col
Apply a turbulence filter, and use this as the background. Experiment with the values to see what they do. I am not sure how, but I have managed to generate a 'marble' like pattern. :-)

maxlen=len
Do not render more than len characters of text. The default is set in the configuration interface. This argument is mostably useful if you want to increase the limit.

textscale=color,color,color,color
Apply a color filter to the text. The colors are, respectively, upper left, lower left, upper right and lower right. It is probably a good idea to increase the 'quant' value when using this argument.

Blue, red, black, darkgreen

outline=color,extra-radius
Draw an outline around the text. Quite useful when combined with textscale.
black, 2 pixels
chisel
Make the text look like it has been cut into the background.
Woodcut opaque=70