1

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:

  1. Change fonts with `chessfss`
  2. Latex: use Pirat font for the King's fig instead of Skaknew King's fig and most importantly:
  3. 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.

  • 1
    well you need \setboardfontfamily to change the board font. beside this it is rather difficult to help you as you didn't say what you did exactly and which error or message you get at all. change to \setboardfontfamily and then show the log-file. – Ulrike Fischer Aug 29 '22 at 15:53
  • Thanks @UlrikeFischer - I have updated the question above with the information requested. – domoarigato Aug 29 '22 at 17:05
  • 1
    as the readme says not for every font the .pfb are provided (because of licensing reasons), you will have to convert them yourself. Some more info about the process is in http://mirrors.ctan.org/macros/latex/contrib/chessfss/chessfss.pdf – Ulrike Fischer Aug 29 '22 at 17:11
  • Thanks again @UlrikeFischer - I have again updated, and I hope it it not too tedious for you. I managed the compilation, but it is not helping – domoarigato Aug 29 '22 at 19:13
  • 1
    chess-merida is not the same as chess-maya. – Ulrike Fischer Aug 29 '22 at 19:31
  • You are right. I started over, and downloaded the correct maya files from the 3rd party source, ran the conversion script again, and repeated the moving of the files into the same location. but I get the same results. !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! with fonts/type1/chess/enpassant/chess-maya-board-fig-raw.pfb in place – domoarigato Aug 29 '22 at 20:43
  • 1
    copy the pfb into the folder of your document. If it works then you probably forgot to update the fndb, if it doesn't work the file name is wrong or the pfb is broken. – Ulrike Fischer Aug 29 '22 at 20:49
  • I copied it into the folder, and it finally worked. But I didnt understand what you meant by: "forgot to update the fndb" can you elaborate? – domoarigato Aug 29 '22 at 20:58
  • 1
    depending on where you put the pfb you need to run mktexlsr to update the file name database. – Ulrike Fischer Aug 29 '22 at 20:59
  • 1
    I can confirm that running mktexlsr fixed 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

0 Answers0