Formatting directives TextComp (experimental)

hi!
I was wondering if there is some more information somewhere regarding the formatting of text in the new textComp. All i could find on the wiki was :

The Text COMP supports inline formatting directives in the text for things like color, strikeouts, underlines, small caps, subscripts, gradients, etc. For example, the code {#color(255, 0, 0);} will turn all text that follows on that line red.

Is this method based on a more general approach in different software packages? or is this an internal structured way of passing a format to the textComp.
Thanks
Roy

Hi Roy, It’s purely the directives that come with Slug Library.

Thanks Greg! Found it!

For other people looking for this. Here is a list of the most common directives :

color(red,green,blue,alpha) Set the primary text color to (red, green, blue, alpha), where
each component is an integer in the range [0, 255]. e red,
green, and blue components are specified in the sRGB color
space, and the alpha component is linear. e alpha component
may be omitted, in which case it is 255 by default. Ignored if
any component is out of range.

size(value) Set the font size to value in absolute units, where value is a
floating-point number. Ignored if value is not greater than*
zero.

stretch(value) Set the text stretch to value, where value is a floating-point
number. Ignored if value is not greater than zero.*

track(value) Set the text tracking to value in em units, where value is a
floating-point number.*

skew(value) Set the text skew to value, where value is a floating-point
number. Positive values skew to the right, and negative values*
skew to the le.*

scale(x,y) Set the text scale to (x, y), where x and y are floating-point
numbers. e y component may be omitted, in which case it is*
set equal to the x component. Ignored if either x or y is not*
greater than zero.*

offset(x,y) Set the text offset to (x, y) in em units, where x and y are
floating-point numbers. Positive values offset right and upward,*
and negative values offset le and downward.*

under(value) Set the underline decoration state to value, where value is*
either true or false. Ignored if the font does not contain*
underline information.*

strike(value) Set the strikethrough decoration state to value, where value is
either true or false. Ignored if the font does not contain**> strikethrough information.*

All options and link to the manual.
( format directives can be found on page 215 )

3 Likes