%%
%% This is file `lsb1enc.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% chessfss-src.dtx  (with options: `lsb1enc')
%% 
%% chessfss: chess font selection commands
%% Copyright 2005 Ulrike Fischer (skak@nililand.de)
%% -------------------------------------------
%% 
%% This file can be redistributed and/or modified under the terms of
%% the LaTeX Project Public License distributed from CTAN archives in
%% the directory macros/latex/base/lppl.txt; either version 1 of the
%% License, or (at your option) any later version.
%% 
%% For error reports see documentation.
%%
%% LSB1: An encoding for chessboard chars
%% that makes it possible to color field and the piece differently.
%% In this encoding the pieces/fields are build with two characters:
%% as field-Layer: pieceOnBlack and as piece-layer: pieceOnWhite.
%% The solid fieldmask layer and the piecemask layer are not used.
%% The encoding (only) works with fonts that can also be encoded as LSB.
%% It will not give a professional looking result!
%% It will not work well if the pieceOnWhite don't cover the pieceOnBlack exactly.

\ProvidesFile{lsb1enc.def}
 [2006/06/09 v1.1
         Standard LaTeX file]

\DeclareFontEncoding{LSB1}{}{}
\DeclareFontSubstitution{LSB1}{skaknew}{m}{n}

\providecommand\cfss@whitefieldcolor{}
\providecommand\cfss@blackfieldcolor{}
\providecommand\cfss@whitepiececolor{}
\providecommand\cfss@blackpiececolor{}

\providecommand\cfss@composefpcolorchar[4]{%range layer: f, p
  \makebox[0pt][l]{%
    \csname cfss@#1fieldcolor\endcsname#2}%
  {\csname cfss@#3piececolor\endcsname#4}}%

\@namedef{cfss@showboardencodingLSB1}{%
\begin{tabular}{llllll}
\multicolumn{6}{l}{\bfseries Encoding \ttfamily LSB1}\\[0.5ex]
 Layer:       & fieldmask
              & field
              & piecemask
              & piece
              & result\\
 WhiteSquare  &
              &\boardfont\cfss@whitefieldcolor 0
              &
              &
              &\boardfont\cfss@WhiteEmptySquare\\
 BlackSquare  &
              &\boardfont\cfss@blackfieldcolor Z
              &
              &
              &\boardfont\cfss@BlackEmptySquare\\
 WhiteOnWhite &
              &
              &
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnWhite\\
 WhiteOnBlack &
              &\boardfont\cfss@blackfieldcolor J
              &
              &\boardfont\cfss@whitepiececolor K
              &\boardfont\cfss@WhiteKingOnBlack\\
 BlackOnWhite &
              &
              &
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnWhite\\
 BlackOnBlack &
              &\boardfont\cfss@blackfieldcolor j
              &
              &\boardfont\cfss@blackpiececolor k
              &\boardfont\cfss@BlackKingOnBlack\\
\end{tabular}}

\DeclareTextCommand\cfss@WhiteEmptySquare  {LSB1}{{\cfss@whitefieldcolor 0}}
\DeclareTextCommand\cfss@BlackEmptySquare  {LSB1}{{\cfss@blackfieldcolor Z}}
\DeclareTextCommand\cfss@WhiteKingOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{white}{K}}
\DeclareTextCommand\cfss@BlackKingOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{black}{k}}
\DeclareTextCommand\cfss@WhiteKingOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{J}{white}{K}}
\DeclareTextCommand\cfss@BlackKingOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{j}{black}{k}}
\DeclareTextCommand\cfss@WhiteQueenOnWhite {LSB1}{\cfss@composefpcolorchar{white}{}{white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnWhite {LSB1}{\cfss@composefpcolorchar{white}{}{black}{q}}
\DeclareTextCommand\cfss@WhiteQueenOnBlack {LSB1}{\cfss@composefpcolorchar{black}{L}{white}{Q}}
\DeclareTextCommand\cfss@BlackQueenOnBlack {LSB1}{\cfss@composefpcolorchar{black}{l}{black}{q}}
\DeclareTextCommand\cfss@WhiteRookOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{white}{R}}
\DeclareTextCommand\cfss@BlackRookOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{black}{r}}
\DeclareTextCommand\cfss@WhiteRookOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{S}{white}{R}}
\DeclareTextCommand\cfss@BlackRookOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{s}{black}{r}}
\DeclareTextCommand\cfss@WhiteBishopOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{black}{b}}
\DeclareTextCommand\cfss@WhiteBishopOnBlack{LSB1}{\cfss@composefpcolorchar{black}{A}{white}{B}}
\DeclareTextCommand\cfss@BlackBishopOnBlack{LSB1}{\cfss@composefpcolorchar{black}{a}{black}{b}}
\DeclareTextCommand\cfss@WhiteKnightOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnWhite{LSB1}{\cfss@composefpcolorchar{white}{}{black}{n}}
\DeclareTextCommand\cfss@WhiteKnightOnBlack{LSB1}{\cfss@composefpcolorchar{black}{M}{white}{N}}
\DeclareTextCommand\cfss@BlackKnightOnBlack{LSB1}{\cfss@composefpcolorchar{black}{m}{black}{n}}
\DeclareTextCommand\cfss@WhitePawnOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnWhite  {LSB1}{\cfss@composefpcolorchar{white}{}{black}{p}}
\DeclareTextCommand\cfss@WhitePawnOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{O}{white}{P}}
\DeclareTextCommand\cfss@BlackPawnOnBlack  {LSB1}{\cfss@composefpcolorchar{black}{o}{black}{p}}

\endinput
%%
%% End of file `lsb1enc.def'.
