Font Specifications
Font Location
In Chart Director, the font name is simply the file name that contains the font. For example, under the Windows platform, the "Arial" font is "arial.ttf", while the "Arial Bold" font is "arialbd.ttf".
Chart Director 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.
Chart Director on Windows will also search for the font files in the "fonts" subdirectory (if it exists) under the directory where the Chart Director DLL "chartdir.dll" is installed. This is useful for private fonts. Also, for some especially secure web servers, the web anonymous user may not have access to the "[windows]\Fonts" directory. In this case, you may copy the font files to the above subdirectory.
Chart Director on Linux,
FreeBSD and Solaris assume the fonts files are in the "fonts" subdirectory under the directory where the Chart Director shared object "libchartdir.so" is installed. Chart Director on Linux,
FreeBSD and Solaris come with a number of font files in the "fonts" subdirectory.
To keep the download size small, Chart Director on Linux,
FreeBSD and Solaris only come with some commonly used fonts. You may download extra 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.
Chart Director supports True Type fonts (.ttf), Type 1 fonts (.pfa and .pfb) and Windows bitmap fonts (.fon). On Mac OS X, Chart Director also supports Font Suitcase and Datafork (.dfont) files. On Linux,
FreeBSD and Solaris, Chart Director also supports Portable Compiled Fonts (.pcf fonts).
If you want Chart Director 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, Chart Director will use the absolute path name and will not search other directories.
Artificial Boldening and Italicizing
Whereas most popular font comes with different styles for "normal", "bold", "italic" and "bold italic", some fonts only come with one style (the normal style). For example, the Monotype Corsiva font that comes with MS Office only has the normal style (mtcorsva.ttf). For these cases, you may append the "Bold" and/or "Italic" words after the font file name (separated with a space) to ask Chart Director to artificially bolden and/or italicize the font. For example, you may specify the font name as "mtcorsva.ttf Bold".
Font Numbers
For every font spec, you can specify up to 3 fonts. The font can be referenced by its number, 1 to 3. This is useful when using international characters that are only available in some fonts.
For example, if you would like to use the Arial font ("arial.ttf") for western characters, and the
MingLiu font "mingliu.ttc" for Chinese characters (since the Arial font does not have Chinese characters), you can use
.TEXT SET FONT NAME to set Arial as font number 1, and
MingLiu as font number 2. Anytime you use that text spec, Chart Director will try the Arial font first. If it cannot find a certain character there, it will try the
MingLiu font.
Indirect Font Names
Chart Director supports several special keywords for specifying the font name indirectly. When these keywords are used as font names, Chart Director will look up the real font names from a font table. The keywords are as follows:
Keywords |
Description |
"normal" |
This default normal font, mapped to "arial.ttf" (Arial). |
"bold" |
The default bold font, mapped to "arialbd.ttf" (Arial Bold). |
"italic" |
The default italic font, mapped to "ariali.ttf" (Arial Italic). |
"boldItalic" |
The default bold-italic font, mapped to "arialbi.ttf" (Arial Bold Italic). |
Font Index
Most font files contain one font. However, it is possible a font file contains multiple fonts (that is, a font collection). For example, in True Type fonts, font files with extension ".ttc" may represent a font collection.
If a font file contains multiple fonts, the font index can be used to specify which font to use. By default, the font index is 0, which means the first font in the font file will be used.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2011-11-10