Name
AddTextToPath -- add vector text to path (V5.0)
Synopsis
AddTextToPath(id, t$[, table])
Function
This function adds the text specified in t$ to the current path. The text will be added to the path as vector graphics. Because of that, this command will only work when a vector font (e.g. a TrueType font) is currently active. It will not work with bitmap fonts. AddTextToPath() will use the active font that was set by the last call to SetFont() or UseFont().

Please note that AddTextToPath() will add the text above the current y-point. Thus, if the path's current y-point is 240 and you add text to it that is 36 pixels high, the text will be placed at an y-position of 204 (240-36=204) instead of 240 as the current y-point might suggest.

Please note that there are currently some restrictions:

The optional argument table allows you to specify further options. The following tags are currently recognized:

Encoding:
This argument can be used to specify the character encoding inside t$. This defaults to the text library default encoding set by SetDefaultEncoding()). See SetDefaultEncoding for details.

Inputs
id
identifier of path to which the text should be added
t$
text to add to path
table
optional: table containing further arguments (see above)
Example
EnableLayers
SetFillStyle(#FILLCOLOR)
SetFormStyle(#ANTIALIAS)
SetFont("Arial", 100, {Engine = #FONTENGINE_INBUILT})
StartPath(1)
MoveTo(1, 0, 0)
AddTextToPath(1, "Hello World")
DrawPath(1, #CENTER, #CENTER + 100, #BLUE, {AnchorX = 0.5,
    AnchorY = 0.5, Rotate = 45})
The code above creates a vector path containing the text "Hello World". The path is then drawn using rotation by 45 degrees.

Show TOC