{font name} [Bold] [Italic]
The followings are some examples:
Arial Bold Times New Roman Courier Bold Italic SansSerif
When using the above format, you may use all fonts that are known to the Java system.
ChartDirector also supports using true-type fonts that are unknown to the Java system, which is useful if you would like to use private fonts in your application. This is by specifying the font using the font filename. ChartDirector will try to load the font file from the Java class path as well as from the file system. This allows you to include the font files in a JAR and include the JAR in the ColdFusion class path.
Special Note for Headless Systems
Using fonts or private font files requires a working the Java font system.
Java running on systems with a GUI should have working font systems. However, some server side Java systems may be "headless", which are systems without GUI. In these cases, Java should be started in headless mode, such as by using the command line flag "-Djava.awt.headless=true". Otherwise, any attempt to use the Java font system may cause error. Please refer to the Java documentation for more details on "headless" mode.
If the Java font system is not working (eg. running on "headless" system but the headless mode is not enabled for Java), as a last resort, ChartDirector will switch to an internal backup font system, so the charts will still work. The internal font system only have 3 fonts - generic sans serif (Arial like font), generic serif (Times New Roman like font) and generic monospace (Courier like font). All of them have bold, italic and bold-italic styles.
Using fonts or private font files requires a working the Java font system.
Java running on systems with a GUI should have working font systems. However, some server side Java systems may be "headless", which are systems without GUI. In these cases, Java should be started in headless mode, such as by using the command line flag "-Djava.awt.headless=true". Otherwise, any attempt to use the Java font system may cause error. Please refer to the Java documentation for more details on "headless" mode.
If the Java font system is not working (eg. running on "headless" system but the headless mode is not enabled for Java), as a last resort, ChartDirector will switch to an internal backup font system, so the charts will still work. The internal font system only have 3 fonts - generic sans serif (Arial like font), generic serif (Times New Roman like font) and generic monospace (Courier like font). All of them have bold, italic and bold-italic styles.