-
Notifications
You must be signed in to change notification settings - Fork 0
Using Fonts
The disadvantage of using image sprites is they aren't flexible. If the chess pieces and board controls were fonts, they could be resized to fit with any design you want to build, and they can be resized without losing quality. The disadvantage of fonts is they are slightly larger in size than images, so download times will be longer.
While the default is images only, Marshall will, if the the useFonts option is true, build the board and controls to use special fonts. The font will need to have the icons/images you want to use mapped to the correct character (two sample fonts have been created to give you an idea how to build those fonts).
The required character mapping is:
B: The symbol for the White Bishop.
C: The icon used as the show/hide comments button in the board controls.
D: The icon used as the drop into variation button in the board controls.
F: The icon used as the fast forward button in the board controls.
I: The icon used as the Invert (flip) board button in the board controls.
K: The symbol for the White King.
L: The icon used for the show/hide move list button in the board controls.
M: The icon used as the make move button in the board controls.
N: The symbol for the White Knight.
P: The symbol for the White Pawn.
Q: The symbol for the White Queen.
R: The symbol for the White Rook.
T: The icon used as the take back last move button in the board controls.
U: The icon used as the up one variation button in the board controls.
W: The icon used as the rewind to start of variation button in the board controls.
b: The symbol for the Black Bishop.
k: The symbol for the Black King.
n: The symbol for the Black Knight.
p: The symbol for the Black Pawn.
q: The symbol for the Black Queen.
r: The symbol for the Black Rook.
Any font that follows these mappings can be used to create display boards in Marshall. See the fontstyle.css file for tips on how to make it work for you.