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 " <chess-pirat-fig.enc <chess-pirat-fig-raw.pfb So to be able to use ttf/otf-fonts directly I must "reorder" the glyphs in the fonts (without changing the original fonts). As a first step I was able to substitute glyphs with a .fea-file: feature renc { substitute K by "glyph name of king"; } renc; But doesn't work all the time. E.g. the pirat font (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 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________