Rectangular text box
If size=
is specified in addition to textPs=
(without textPath=
and textFlowPath=
), text is constrained to the specified rectangle. The layer is positioned as usual. Character glyphs near the text box edges may be rendered partially outside the text box.
color=
fills the region defined by size=
.
All RTF commands are applied as expected.
Variable height text box
Specifying size=
with 0 height allows the text box to be sized vertically to accommodate all contents. The layer width is defined by the width of size=
, and the layer height by the height of the actual rendered text. The layer is positioned as usual. Character glyphs near the left and right edges of the text box may be rendered partially outside the text box.
color=
fills the rectangle defined by the width specified with size=
and the height of the actual text rendered.
The following RTF commands are ignored:
\vertal*
Self-sizing text in path
textFlowPath=
in conjunction with textPs=
can be used to define one or more regions into which text should be flowed. textFlowXPath=
may be specified optionally to exclude text from flowing into one or more areas. If size=
is not specified, the resulting text layer is self-sizing and the layer size is determined by the bounding box of the text actually rendered.
If neither origin=
nor anchor=
are specified, the layer anchor defaults to (0,0) of the pixel coordinate space used to define the path(s), ensuring absolute positioning regardless of the rendered text. If anchor=
or origin=
are specified, the layer is positioned relative to (and adapting to) the bounding box of the actual contents rendered.
color=
fills the bounding box of the actual text rendered.
The following RTF commands are ignored:
\marg*
Pre-sized text in path
If size=
is specified together with textFlowPath=
, the layer size is pre-determined. (0,0) of the pixel coordinate space used to define the path(s) is located at the top-left corner of the layer rectangle.
The textFlowPath=
regions may be located outside the layer rectangle. Text is always flowed and rendered into all path regions, even if this results in text being rendered outside the layer rectangle. extend=0,0,0,0
can be used to crop the rendered text to the layer rectangle.
For layer positioning purposes, the layer rectangle is based on the specified size=
, regardless of how much text is actually rendered, even if some of it is located outside the layer rectangle. Standard layer positioning applies.
color=
fills the rectangular area defined by size=
.
The following RTF commands are ignored for textFlowPath=
:
\marg*
Self-sizing text on path
textPath=
defines one or more paths onto which text specified with textPs=
should be rendered. When size=
is not specified, the resulting text layer is self-sizing. The layer size is determined by the bounding box of the actual text rendered.
If neither origin=
nor anchor=
are specified, the layer anchor defaults to (0,0) of the pixel coordinate space used to define the path; the position of the rendered text is fixed regardless of how much text is rendered. If anchor=
or origin=
are specified, the layer is positioned relative to (and adapting to) the bounding box of the actual contents rendered.
color=
fills the bounding box of the actual text rendered.
The following RTF commands are ignored:
\marg*
\hyph*
\vertal*
Any text after the first \par
or \line
is ignored.