Vizard has support for displaying all Unicode characters using UTF-8 encoding. In order to display Unicode text you must first set the encoding of your script to UTF-8 ( File > Encoding > UTF-8 ). You will now be able to type Unicode characters into your script.
Vizard uses the Arial font by default. Some languages are not supported by this font and will show up as invalid characters. In this case you can tell Vizard to use a different font by modifying the viz.text.font option. When a new text object is created Vizard will use this option to set the font. If you want to display Japanese text, for example, add the following line to the top of your script:
This will tell Vizard to use MingLiU as the default font for all text objects.
All text objects will use the default global text encoding. The global text encoding is specified by the viz.text.encoding option in your cfg file. The default behavior of this option is to automatically determine the encoding by checking for a UTF-8 BOM in the main script file. However, a text object can override the global default by using the <text>.setEncoding command:
This code will force the text object to use UTF-8 encoding, regardless of the global encoding value.
Vizard also supports displaying right-to-left languages, like hebrew or arabic. In order to support these languages you need to enable the viz.text.bidirectional option in your cfg file or in your script by using the following code:
When this option is enabled Vizard will automatically perform the Unicode Bidirectional algorithm on the input characters when displaying UTF-8 encoded text.