2. Bundling better math fonts

The MathML add-on is bundled with a set of fonts which are not used by default. If you want to force the use of this font set or if you want to specify an alternate font set, you'll have to specify a proper value for the "mathml.fonts" preference key.

The syntax of the value of this preference key is:

key_value --> logical_font_name ';' font_spec
              [ ';' logical_font_name ';' font_spec ]*

logical_font_name --> 'normal'
                  | 'bold'
                  | 'italic'
                  | 'bold-italic'
                  | 'sans-serif'
                  | 'bold-sans-serif'
                  | 'sans-serif-italic'
                  | 'sans-serif-bold-italic'
                  | 'monospace'
                  | 'fraktur'
                  | 'bold-fraktur'
                  | 'script'
                  | 'bold-script'
                  | 'double-struck'

font_spec --> physical_font_name
          | TTF_file_URI

A physical_font_name example is "Century Schoolbook L Roman" and not just "Century Schoolbook L", which is a font family.

Example C.1. Force the use of the bundled font set using the command-line

(Remove the newline character found after each ";".)

xxe -putpref mathml.fonts "monospace;mathml-config:fonts/DejaVuSansMono.ttf;
sans-serif;mathml-config:fonts/DejaVuSans.ttf;
bold-sans-serif;mathml-config:fonts/DejaVuSans-Bold.ttf;
sans-serif-italic;mathml-config:fonts/DejaVuSans-Oblique.ttf;
sans-serif-bold-italic;mathml-config:fonts/DejaVuSans-BoldOblique.ttf;
normal;mathml-config:fonts/DejaVuSerif.ttf;
bold;mathml-config:fonts/DejaVuSerif-Bold.ttf;
italic;mathml-config:fonts/DejaVuSerif-Italic.ttf;
bold-italic;mathml-config:fonts/DejaVuSerif-BoldItalic.ttf;
fraktur;mathml-config:fonts/typographerfraktur.medium.ttf;
bold-fraktur;mathml-config:fonts/typographerfraktur.bold.ttf;
script;mathml-config:fonts/tangerine.regular.ttf;
bold-script;mathml-config:fonts/tangerine.bold.ttf;
double-struck;mathml-config:fonts/sortefax.medium.ttf"

Note how the "mathml-config:" prefix may be used to refer to the directory where the MathML add-on has been installed. This works because the following rule has been added to mathml_addon_install_dir/mathml_catalog.xml:

<rewriteURI uriStartString="mathml-config:" rewritePrefix="." />