drawText( string, x, y, isCentred=false )
Draws the outline of the given String, to the screen at the x/y location. This will draw using the current font, which can be set using 'setFont'.
Like similar functions, 'isCentred' allows you to state if the x/y location is the top-left corner (when false), or the middle of the string (when true).
Multi-line text is supported through including the end of line character, "\n", in a string.
fill( :black )
drawText( "Hello World!", 10, 10 )
drawText( "Here is a piece of\nmultiline text", 10, 80 )
Note that how this is rendered is heavily dependent on the browser, and the OS. You should never expect text to look exactly the same on all machines.
drawText( string, x, y, xAlign, yAlign )
The same function, but with x and y axis alignment parameters. See the article on How Alignment Works for more details.