Font Configuration in Amaya
How Amaya selects fonts
In order to let you choose your fonts, Amaya works with a Font
Configuration file. By default that Font configuration file is located in the
directory Amaya/config/:
- The file
"fonts.gl.mac" is used by Mac OSX versions of Amaya - The file
"fonts.gl"is used by Windows and Linux OpenGL versions of Amaya - The file
"fonts.gl.win"is used by Windows versions of Amaya
Format of Font Configuration files
Criteria used to select a font are:
- the script:
0for unicode ( for japanese),1-17for ISO-8859-1 to ISO-8859-17,20for Symbol ,21for Stix fonts. - the font family:
1for serif,2for sans-serif,3for monspace,4for cursive,5for fantasy - the font face:
1for normal,2for bold,3for italic
The principle is to attach the path of of the font file (for example : "/share/fonts/type1/gsfonts/a010013l.pfb") to each set of criteria in Font Configuration files.
The syntax of these files is:
- One line that declares the script + a comment
<script>,#<a comment> - Followed by several lines that declare the connexion between a font
family and a font face with a font selector. For optimisation purpose,
it's possible to declare several font faces in the same line. In this
case only the first font face identifier (1 for example) is declare. The
second font selector is connected to the first font face identifier
incremented to 1, etc.
<font-family>;<font-face>=<font descriptor>;<font descriptor>;....
For any undefined entry, Amaya applies its standard strategy to select a font (as if no Font Configuration file exists).
#example ( the tree line above are mandatory)
9;#Latin5 (Turkish)
1;1=-*-*-medium-*-*-*-12-*-75-75-*-*-iso8859-9;2=-*-*-bold-*-*-*-12-*-75-75-*-*-iso8859-9;3=-*-*-medium-i-*-*-12-*-75-75-*-*-iso8859-9; 2;1=-*-*-medium-*-*-*-12-*-75-75-*-*-iso8859-9;2=-*-*-bold-*-*-*-12-*-75-75-*-*-iso8859-9;3=-*-*-medium-i-*-*-12-*-75-75-*-*-iso8859-9; 3;1=-*-*-medium-*-*-*-12-*-75-75-*-*-iso8859-9;2=-*-*-bold-*-*-*-12-*-75-75-*-*-iso8859-9;3=-*-*-medium-i-*-*-12-*-75-75-*-*-iso8859-9;
Open issues
- The field pixel_size in a font selector is not taken into account, as it is overwritten by Amaya when loading a font.
- The selected font resolution 75-75 may have an impact on font sizes on screen.
- Some fonts have limited set of sizes. By example the font "mutt clearly ui" exists only in sizes 24 and 75.
- The "monotype-symbol" doesn't work with Amaya (at least for drawing integrals).