@@ -7,17 +7,28 @@ A single symbol in a [[type:symbol font]].
...
@@ -7,17 +7,28 @@ A single symbol in a [[type:symbol font]].
--Properties--
--Properties--
! Property Type Default Description
! Property Type Default Description
| @image font size@ [[type:double]] value from symbol font To what point size does the images correspond?
| @image font size@ [[type:double]] value from symbol font To what point size does the images correspond?
| @code@ [[type:string]] ''required'' Text this symbol matches.<br/>
| @code@ [[type:string]] or [[type:regex]] ''required'' Text this symbol matches.
A single symbol can omit the code, this then becomes the ''default symbol'', on which text is drawn.
| @regex@ [[type:boolean]] @false@ Is the code a regular expression (as opposed to a string)?
| @image@ [[type:scriptable]] [[type:image]] ''required'' Image of this symbol.
| @image@ [[type:scriptable]] [[type:image]] ''required'' Image of this symbol.
| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this symbol actually used?<br/>
| @enabled@ [[type:scriptable]] [[type:boolean]] @true@ Is this symbol actually used?<br/>
This can be scripted to optionally disable certain symbols.<br/>
This can be scripted to optionally disable certain symbols.<br/>
If multiple symbols with the same code are given disabling the first switches to the second one.
If multiple symbols with the same code are given disabling the first switches to the second one.
| @draw text@ [[type:int]] @-1@ The index of the captured regex expression to draw as text, or -1 to not draw text.<br/> For example with the code @"x([a-z])"@ and @draw text: 1@ the text of the symbol @"xb"@ will be @"b"@.
| @text font@ [[type:font]] Font to use for drawing text on symbols. The font size is in font points per text box font point.
| @text alignment@ [[type:alignment]] @"middle center"@ How should text be aligned on the symbol?
| @text margin left@ [[type:double]] @0@ Margin on the left of the text in pixels per point.
| @text margin right@ [[type:double]] @0@ Margin on the right of the text in pixels per point.
| @text margin top@ [[type:double]] @0@ Margin on the top of the text in pixels per point.
| @text margin bottom@ [[type:double]] @0@ Margin on the bottom of the text in pixels per point.
--Examples--
--Examples--
A default symbol:
A symbol with text:
>symbol:
>symbol:
> image: blank.png
> image: blank.png
> code: .
> regex: true
> text font: Arial
Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]].
Two symbols for the same code, which one is used depends on a function from the [[type:stylesheet]].
It is recommended to only use functions in @enabled@, so each stylesheet can determine how the font should be used.
It is recommended to only use functions in @enabled@, so each stylesheet can determine how the font should be used.