# How to set figurine font on chessboard with solid grey "black" squares?

I am learning how to use the package "chessboard". I would like to typeset chessboards' black squares as solid grey rather than as the default diagonal lines, because

• I find the lines a bit distracting
• I can control the shade of grey and thus make my own choice of compromise between "so dark, figurines on black squares are hard to recognise" and "so pale, black squares are hard to see"

This is fine but only works with chessboard's default figurine font, Merida:

\documentclass[a4paper]{article}
\usepackage[LSBC4,T1]{fontenc} % use fontenc before chessboard
\usepackage{chessboard}

\setboardfontencoding{LSBC4}

\setchessboard{
boardfontfamily=alpha % futile; still uses Merida
}

\makeatletter
\makeatother

\begin{document}
\setchessboard{setfen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR}
\chessboard
\end{document}


I can change the figurine font if I use encoding LSB or LSF, but then that enforces the "diagonal lines regime":

\documentclass[a5paper]{article}
\usepackage[LSB,T1]{fontenc} % use fontenc before chessboard
\usepackage{chessboard}

\setboardfontencoding{LSB}

\setchessboard{
boardfontfamily=alpha
}

\begin{document}
\setchessboard{setfen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR}
\chessboard
\end{document}


Any way to select a font and also have the solid grey "black" squares? Rather tantalisingly, Ulrike Fischer's document "The chess fonts gallery" (June 2006), p.3, shows Alpha both on "lined" and on grey "black" squares, although in the latter case the white figurines' interiors are transparent, whereas they should be white (look at white figurines on black squares).

The board encodings with a "C" in their name needs special glyphs for the color effects (e.g. field masks and piece masks). These encodings only works with rather sophisticated, complete chess fonts.

For a rather simple font like alpha you can't use the encoding. The only thing that works there is to color the board through the background pgf picture.

A similar font with more glyphs is alphadia. For this font LSBC4 works.

For both variants you need the files in the enpassant package. With miktex you can install the package with the miktex console. But with texlive you will have to install them manually as texlive doesn't ship them.

\documentclass[a4paper]{article}
\usepackage[LSB2,LSBC4,T1]{fontenc} % use fontenc before chessboard
\usepackage{chessboard}

\begin{document}
\setchessboard{setfen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR}
\chessboard[
boardfontfamily=alpha,
boardfontencoding=LSB2,
color=gray!40,
trimtocolor=black,
colorbackboard]

\setchessboard{setfen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR}