Previous Topic

Next Topic

Book Contents

Book Index

Java Rendering Engine

The MathFlow Java rendering engine first attempts to render characters using a collection of four preferred system fonts. The specific system fonts to be used may be identified through the use of a configuration file as described below. Internally, MathFlow considers all characters as belonging in one of the following four broad classes:

  • ALPHA_NUMERIC
  • GREEK
  • SYMBOL
  • EXTRA SYMBOL

The SYMBOL class corresponds to characters found in the standard Adobe Symbol encoding. EXTRA SYMBOL is a catch-all for everything else. MathFlow associates the following numerical values with the following four classes of characters:

ALPHA_NUMERIC = 100

SYMBOL = 101

EXTRA_SYMBOL = 102

GREEK = 103

The default font associations are as follows:

100=Times New Roman

101=Euclid Symbol

102=Code2000

103=Euclid Symbol

To modify the font associations that will be used by MathFlow Editor, create a file named "FontMapping.opt" and place it in this folder:

Windows: C:\Users\<username>

Mac: your user home directory

Unix: your user home directory

Write four lines in the file, one for each character class of the form NNN=<font name>, as shown above. Once you restart MathFlow, these fonts will become the preferred system fonts for character display.

Example

In this example, you need all of the characters that are alpha-numeric to use the system font "Arial." To do this, you will need to change the ALPHA_NUMERIC value (ID is 100 in the FontMapping.opt file) to Arial, rather than Times New Roman as shown above. To accomplish this, use the following FontMapping.opt file:

100=Arial

101=Euclid Symbol

102=Code2000

103=Euclid Symbol

This mapping will cause every character MathFlow identifies as an "alpha numeric" character to be displayed in the specified font. Be aware that if you use the wrong font name in FontMapping.opt, you will not see the correct font. It will use MathFlow's internal font if it can't find the system font listed in the file. It is possible to pick any system font, but be aware that most system fonts do not contain glyphs for non-alphanumeric characters. Euclid Symbol is a high quality font for common symbol characters, and you will generally not need to change it. However, Code 2000 is a lower-quality, shareware font whose main appeal is that it has exceptionally comprehensive coverage of Unicode, and depending on what symbols you need, you may wish to replace it with a higher quality font. The "GREEK" font defaults to Euclid symbol, since it has high-quality Greek characters, but high-quality fonts with Greek characters in other styles are not uncommon. In general, you may need to experiment to make sure that the system fonts that you pick contain the proper glyph for the Unicode characters you plan to use.

Previous Topic

Next Topic

Book Contents

Book Index


[Design Science Home]
Copyright © 1996-2016 Design Science, Inc. All rights reserved.