Vizard 7 » Tutorials & Examples » 3D models » Text nodes » Tutorial: Changing the font
7.6

Tutorial: Changing the font with your script

Now let's modify the font for the 3D text using the <node3D:text3D>.font command. Add the following code and run your script:

text3D.font('Times New Roman')

The font command simply changes the font of the text to the given font, which is Times New Roman in this case. Vizard will look inside the Windows/Font directory when setting a font. You can browse that directory to see what fonts are available on your system.

 

Vizard uses the Arial font by default. Some languages are not supported by this font and will show up as invalid characters. If you are interested in displaying characters from non-Latin alphabets take a look at the Unicode text page in the reference section for more information.

Setting up a text world

Creating text

Changing the font

Changing the message