ChartDirector supports several special keywords for specifying the font name indirectly. When these keywords are used as font names, ChartDirector will look up the actual font names from a font table. The keywords are as follows:
Keywords | Description |
---|---|
"normal" | This default normal font, which is the first font in the font table. This is initally mapped to "arial.ttf" (Arial). |
"bold" | The default bold font, which is the second font in the font table. This is initally mapped to "arialbd.ttf" (Arial Bold). |
"italic" | The default italic font, which is the third font in the font table. This is initally mapped to "ariali.ttf" (Arial Italic). |
"boldItalic" | The default bold-italic font, which is the fourth font in the font table. This is initally mapped to "arialbi.ttf" (Arial Bold Italic). |
"font{N}" | The (N + 1)th font in the font table (the first font is "font0"). |
The font table can be modified using BaseChart.setFontTable or DrawArea.setFontTable.
The advantage of using indirect font names is that you can change the fonts fonts in your charts in one place.
ChartDirector on Windows does not come with any font files. It relies on the operating system's font files in the "[windows]\Fonts" directory. To see what fonts are installed in your operating system and their file names, use the File Explorer to view that directory.
ChartDirector on Linux/FreeBSD/Solaris assumes the fonts files are in the "fonts" directory under the directory where the ChartDirector shared object "libchartdir.so" is installed. ChartDirector on Linux/FreeBSD/Solaris comes with a number of font files in the "fonts" directory.
To keep the download size small, ChartDirector on Linux/FreeBSD/Solaris only comes with some commonly used fonts. You may donwload additional fonts from the Internet. In particular, the Microsoft fonts at http://sourceforge.net/project/showfiles.php?group_id=34153&release_id=105355 is highly recommended. Please refer to http://www.microsoft.com/typography/faq/faq8.htm on how you could use the fonts legally in your system.
ChartDirector supports True Type fonts (.ttf), Type 1 fonts (.pfa and .pfb), Windows bitmap fonts (.fon), and Portable Compiled Fonts (.pcf fonts). The PCF fonts are supported on Linux/FreeBSD/Solaris only, while the other fonts types are supported on both Windows and Linux/FreeBSD/Solaris.
If you want ChartDirector to search other directories for the font files, you may list the directories in an environment variable called "FONTPATH".
If you specify an absolute path name for the font file, ChartDirector will use the absolute path name and will not search other directories.