Texts

Texts are to be placed in double quotes and may contain any Unicode characters. Entering Unicode font names is also supported. Furthermore, it is possible to specify non-integer font sizes. For example:

AddText(100;​100;​"国字";​ヒラギノ明朝Pro W6;​12.5)

 
Example
EXAMPLE_01
1

OpenDrawing(200;​210)

2

AddText(10;​ 20;​"Hello World (English)";​Arial;​12;​plain;​40 40 40)

3

AddText(10;​ 40;​"مرحبا العالم (Arabic)";​Tahoma;​12;​plain;​40 40 40)

4

AddText(10;​ 60;​"你好世界 (Chinese)";​黑體-繁;​12;​plain;​40 40 40)

5

AddText(10;​ 80;​"Γεια σας κόσμο (Greek)";​Arial;​12;​plain;​40 40 40)

6

AddText(10;​100;​"안녕하세요 세계 (Hangul)";​애플명조;​12;​plain;​40 40 40)

7

AddText(10;​120;​"שלום עולם (Hebrew)";​Microsoft Sans Serif;​12;​plain;​40 40 40)

8

AddText(10;​140;​"नमस्ते दुनिया (Hindi)";​;​12;​plain;​40 40 40)

9

AddText(10;​160;​"こんにちは世界 (Japanese)";​ヒラギノ角ゴ Pro W3;​12;​plain;​40 40 40)

10

AddText(10;​180;​"Привет мир (Russian)";​Verdana;​12;​plain;​40 40 40)

11

AddText(10;​200;​"สวัสดีชาวโลก (Thai)";​Tahoma;​12;​plain;​40 40 40)

12

CloseDrawing()

EXAMPLE_01

Special Characters

The backslash (\) can be used to insert new lines, double quotes, and other special characters into a string. Character combinations consisting of a backslash followed by a letter or by a combination of digits are called escape sequences. xmCHART supports the following escape sequences:

\n ........... Newline

\r ........... Carriage return

\t ........... Horizontal tab

\\ ........... Backslash

\" ........... Double quote

\uxxxx ....... Single Unicode character formed by 4 hexadecimal digits.

\Uxxxxxxxx ... Single Unicode character formed by 8 hexadecimal digits.

For example, to output double quotes you must place a backslash before each double quote. Example:

TitleText("Company \"Universal Exports\"") /* Output: Company "Universal Exports" */

Texts may also have several lines. For example:

TitleText("Chart 1\nOverview\nLine 3") /* \n...line break */

A Unicode escape sequence represents the single Unicode character formed by the hexadecimal number following the \u or \U character. The lowercase \u escape sequence is followed by 4 hex digits, the uppercase \U escape sequence is similar, but expects 8 hex digits, not 4.

Not all fonts have all Unicode characters; in fact most have only a small fraction. Also — the unofficial but widely used — private-use characters may not be available on all operating systems or are displayed differently. See EXAMPLE_03 below.
 
Examples
EXAMPLE_02
1

OpenDrawing(220;​60)

2

AddText(10;​40;​

3

"\u270D \u2030 \u266C \u2318 \u267B \u2718 \u2714";​

4

Arial;​24;​plain;​86 111 145)

5

CloseDrawing()

EXAMPLE_02
EXAMPLE_03
1

OpenDrawing(290;​60)

2

AddText(10;​40;​

3

"\u2109 \u27F2 \U0001F50E \U0001F512 \U0001F4CE \U0001F4BB \U0001F464 \U0001F4AC \U0001F557";​

4

Arial;​24;​bold;​86 111 145)

5

CloseDrawing()

EXAMPLE_03

Entering texts in FileMaker’s Specify Calculation dialog box

It is important to note that double quotes should be prefixed by a backslash (\") when entering texts in FileMaker’s Specify Calculation dialog box. For example:

xmCH_DrawChart(

"OpenDrawing(180;​50)

AddText(20;​30;​\"Company Universal Exports\")

CloseDrawing()")

FileMaker Dialog Box Enter Quotes 1

To place double quotes in a string of text, escape them twice, once for xmCHART (\") and again for FileMaker (\\\"). For example:

xmCH_DrawChart(

"OpenDrawing(180;​50)

AddText(20;​30;​\"Company \\\"Universal Exports\\\"\")

CloseDrawing()")

FileMaker Dialog Box Enter Quotes 2

For more information on entering comments, please refer to section Scripts.

 

Typographical quotes

Double quotes (") are not to be confused with typographical quotes (“”). Typographical quotes, also known as smart quotes or curly quotes can be activated or deactivated under FileMaker Pro menu item: File > File Options… > Text.

FileMaker Dialog Box Text Smart Quotes
Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×