A fonts file can be specified by option -f fonts_file in the command line of the call of res2image, but its default is the file called fonts.txt, located in the same directory as the executable of res2image.
The fonts file consists of the following parts:
% encoding_apple_roman 0.15 0.03
GlyphBasic1.ttfWe assume these fonts are numbered 1, 2, 3, ...
% 6 6
G42 2 186which specifies that the glyph for Gardiner code G42 is to be found in the second TrueType font, at index 186.
D33 161which specifies that the glyph for Gardiner code D33 is to be found in the first TrueType font, at index 161. This is convenient if we have stuffed the complete sign list in a single TrueType font.
open 5 35or
close 5 36These specify the locations of the glyphs for the unconnected open and close brackets of cartouches, i.e. for the glyph_names 'open' and 'close'.
cartoucheopen 5 35or
cartouchesegment 5 37or
cartoucheclose 5 36Each type of box is represented by an 'open' glyph, a 'close' glyph and a 'segment' glyph, i.e. the part of which a sufficient number of copies is inserted between the open and close glyphs to match the size of the contents of the box. In the example, the box type is cartouche, and we refer to the three glyphs by that type followed by the strings open, segment and close. Within the constraints of the syntax of RES, one may freely add new box types.
hlr 5 49or
hrl 5 50or
vlr 5 51or
vrl 5 52With the option -hlrspec, res2image puts a sign in front of the first image that indicates the direction specified within the encoding. These signs are referred to in the fonts file by hlr, hrl, vlr and vrl. If such signs are not available, one may either omit the corresponding lines from the fonts file, or specify the TrueType file number 0, which indicates non-existence of a sign.
Each line of this file starts with a string consisting of one or more upper-case of lower-case letters or digits, then one or more characters of white space, and then a Gardiner code.