I am trying to create a simple chessboard with an a non-default font, such as "pirat" as described in the documentation of chessfss and have followed the instructions from the README of the enpassant package on CTAN. I have the following latex:
% !TEX root = test.tex
\documentclass[11pt]{article}
\usepackage[margin=2.5cm, a4paper]{geometry}
\usepackage{chessfss}
\pdfmapfile{=chess-enpassant.map}
\begin{document}
\newcommand\testboard{{%
\boardfont
\noindent
rmblkans\
opopopop\
0Z0Z0Z0Z\
Z0Zqj0Z0\
0Z0LKZ0Z\
Z0Z0Z0Z0\
POPOPOPO\
SNAQJBMR\par}}
\setfigfontfamily{pirat}
\testboard
\enddocument
I consulted other questions on this topic, for example:
- Change fonts with `chessfss`
- Latex: use Pirat font for the King's fig instead of Skaknew King's fig and most importantly:
- Installing enpassant fonts
I did everything written in this last post, but in my case, even after putting the chess-enpassant.map file in the same directory as the root tex file, I could not get the board font to change.
in addition to \setfigfontfamily{pirat} I also tried \setboardfontfamily{pirat}
Update
It turns out that \setboardfontfamily{pirat} actually does work, but \setboardfontfamily{maya} still does not. I made the mistake of assuming the same error was responsible for both failures. In the case of maya, the error logs contain:
(/usr/local/texlive/2022basic/texmf-dist/tex/latex/chessfss/enpassant/lsbmaya.fd) [1] (/Users/jamie/Library/Group Containers/G69SCX94XU.duck/Library/Application Support/duck/Volumes/Mountain Duck/books/tex/.texpadtmp/test.aux) ){/usr/local/texlive/2022basic/texmf-dist/fonts/enc/chess/enpassant/chess-board.enc}
!pdfTeX error: /Library/TeX/texbin/pdflatex (file chess-maya-board-fig-raw.pfb): cannot open Type 1 font file for reading
the file chess-maya-board-fig-raw.pfb does not exist, because only .afm and .tfm files for maya are included in the CTAN download. Moreover, the instructions to use ttf2pt1 do not seem to apply, and I get errors trying to use that tool on the included maya files.
Update 2
It was unintuitive that .afm and .tfm files were provided in the CTAN download, but it is nevertheless necessary to download the .ttf files from another source: after which the included files can easily be reproduced. Anyway, I managed it with ttf2pt1 -b MERIFONT.TTF chess-maya-board-fig-raw, which succeeded and copied the resulting .pfb file to the same directory as the others: fonts/type1/chess/enpassant/
I copied the resulting file: chess-maya-board-fig-raw.pfb to fonts/type1/chess/enpassant/ but still get the error:
!pdfTeX error: /Library/TeX/texbin/pdflatex (file chess-maya-board-fig-raw.pfb): cannot open Type 1 font file for reading
==> Fatal error occurred, no output PDF file produced!
The permissions on the file are 664.
!pdfTeX error: /Library/TeX/texbin/pdflatex (file chess-maya-board-fig-raw.pfb): cannot open Type 1 font file for reading ==> Fatal error occurred, no output PDF file produced!withfonts/type1/chess/enpassant/chess-maya-board-fig-raw.pfbin place – domoarigato Aug 29 '22 at 20:43mktexlsrfixed it. I have another issue, but it relates to chessboard, and it will have to wait for another day. Thank you so much for your help. Chess is a human story, and I appreciate your contribution to making that story easier to tell. – domoarigato Aug 29 '22 at 21:03