Hello,
I'm currently a bit playing around with the idea to add some support
in the (LaTeX) package "chessfss" (which handle chess fonts) for
fonts loaded with the luaotfload package. As luaotfload use the
context code to load the font I'm hoping that someone here can help
me with some of my problems.
Chess fonts are highly unstandard. The different authors of the
fonts did put the chars quite randomly in the character table and
also used various glyphs name. So in the psfonts.map almost every
font has its own encoding vector:
chess-pirat-lsf ChessFigurinePirat " ChessPiratFigEncoding
ReEncodeFont " http://www.enpassant.dk/chess/downl/pirat.zip)
shows already some on the problems of the project: The king with the
glyph name c140 is shown in fontforge on position 140 with a "å"
above. The å is shown on position 229 with an "Å". luaotfload seems
to think that there are two "aring" and so the temp-lua-file of the
font contains in the unicodes table the enrty "c140={ 229, 140 }"
and my substituation rule gets me an "å" instead of the King I want.
I get the correct substituation if I manually change the entry
"c140={ 229, 140 }" to "c140=140.
So here the questions:
1. How can I make this change after the font has been defined? I
tried to find table entries which do contain this setting and change
them, but without luck. So either I didn't find the right table or I
need to execute some "reload" funktion.
2. Is there another way to reorder the font than using .fea-files?
E.g. by changing some font entries?
3. I can print the king by using its position with \char140. But how
can I print the king in a document by using its glyph name (c140)?
4. Quite a lot chess fonts are incomplete. Is is possible to insert
glyphs from other fonts?
Btw:
The font Alfonso (http://www.enpassant.dk/chess/downl/alfonso.zip)
gives an error message. Probably the font is faulty somehow (I
wouldn't be surprised) but perhaps it also indicates a hidden bug,
so I'm mentioning it:
\documentclass{article}
\usepackage{luaotfload}
\begin{document}
\font\test={name:Chess Alfonso-X}
\test \fbox{K}
\end{document}
! LuaTeX error
J:/MiKTeX2.9/tex/luatex/luaotfload/otfl-font-otn.lua:2398: table
index is nil.
<to be read again>
\test
--
Ulrike Fischer