I’ve spend few minutes to try to undestand how the encondings can be used. It seems to me that they are used in compound_font_rep
to remap certain characters to glyphs belonging to different fonts. These compound fonts are defined by rules like those in $TEXMACS_PATH/progs/fonts/fonts-composite.scm
. Instantiated via a call to compound_font
(in src/Graphics/fonts/compound_font.cpp
) from find_font_bis
(in src/Graphics/fonts/find_font.cpp
) which match the (compound ....)
rule declaration. The rule format seems to be
(compound ((enc1 font1) (enc2 font2) ... (any fontDefault)))
where encX
is an encoding in $TEXMACS_PATH/fonts/enc
and fontX
is a font specifier (which maybe should be translated recursively via another rule). fontDefault
seems the default font to use. See e.g. $TEXMACS_PATH/progs/fonts/fonts-truetype.scm
for the specifiers of truetype/opentype fonts which have tag (unicode ....)
.
So by putting these building blocks together and hardcoding the position of the old-style glyphs it seems possible to have a package which select old-style glyphs for some of the standard fonts. Would be cool to have it.