International Fonts and Character Support

This section discusses the use of Corda® 7's PopChart® and OptiMap™ modules with international (non-U.S). fonts and character sets. This section includes the following topics:

Installing International Fonts

The Times, Helvetica, and Courier font sets included with Corda 7 provide very little support for international characters. Corda 7's Lucida font provides somewhat better support, but does not contain any Asian or double-byte characters.

Because of this, you might need to install international fonts to Corda 7 to take full advantage of Corda 7's international/double-byte character support.

Install international fonts just as you would any other custom font. First, locate a compatible TrueType font that supports the needed international characters, then convert the font to the Corda font format, as instructed in Creating Custom Fonts.

Note: A common font that contains a large number of Unicode characters is Arial Unicode MS.

If you converted the font on a system other than the one on which you have installed Corda 7, install the font to the Corda 7 machine as described in Installing Custom Fonts.

Using Non-Latin Characters in Image Template files

Once you have installed an international font, use it in Corda Builder™ as you would any other font. Simply select an object that contains text, go to its Font dialog, and choose the international font from the font list.

As long as the text uses an international font, you can use international (non-Latin) characters in it without any problems.

Changing Corda Builder's Dialog font

You may see a box in place of a character when you enter non-Latin characters in Corda Builder dialogs. This problem is a result of Corda Builder's dialog font being incapable of displaying the specified international character. However, when you preview the image, the correct character is still used. You may be able to correct this problem by changing Corda Builder's dialog font to something that supports the character you are using. Change the font by selecting Edit > Preferences, and then selecting the Font dialog.

Using Non-Latin Characters in Web Development

If you want to dynamically send text that contains non-Latin characters to Corda Server™, first make sure that the destination Image Template file component uses a font that supports such characters.

Send the text that contains non-Latin characters to Corda Server using ITXML or PCScript. Data files can also contain non-Latin characters.

ITXML

ITXML's character set is restricted ISO-8859-1. This means that all characters not available in the ISO-8859-1 character set must be represented using the HTML entity encoding method. An example of this is 狕 which represents Unicode character number 72d5 in hexadecimal. This is a standard encoding method described in many places, including the www.W3C.org Web site.

Here is an example of a textbox that includes a non-Latin character:

Using Non-Latin Characters in ITXML

<cit:textbox name="textbox" common="top:38;left:44;width:93;height:43">

<cit:text content="Sample Text &#72d5;"/>

</cit:textbox>

There are a number of ways of sending ITXML to Corda Server. For more information, see ITXML in the Corda 7 Developer Reference.

PCScript

The most basic method of using non-Latin characters in PCScript is to delimit the character in Unicode. To learn how to do this, see Special Characters in PCScript in the Corda 7 Developer Reference.

A more attractive alternative would be to store the PCScript in server command files. Server command files are text-based files and can be encoded in a variety of character sets. When Corda Server loads this file, tell Corda Server which character set the file uses. For information about server command files, see How to Use PCScript in the Corda 7 Developer Reference.

In order to specify the character set, either use the loadCommandFile Corda Embedder method, or the @_ENCLOADREQUEST server command. In both cases, you must send an additional argument—the character set that the file is encoded in.

Data Files

Data files encoded in alternate character sets can be loaded using the loadData Corda Embedder method or the graph.loadFile pcscript command. In both cases, you must send an additional argument—the character set that the file is encoded in.