Chess symbols in Unicode

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 2600:8802:5601:600:c4ae:f1f4:4fa2:454d (talk) at 22:02, 6 January 2021 (→‎Chessboard using Unicode symbols). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Font depictions of Unicode chess symbols (in the same order as the table). 1st: DejaVu Sans; 2nd: FreeSerif; 3rd: Quivira; 4th: Pecita.
A screenshot of the GNU Chess program in graphic mode showing the chessboard with Unicode characters.
GNU Chess using Unicode chess characters to display a chess board in the terminal.

Chess symbols are part of Unicode. Instead of using images, one can represent chess pieces by symbols that are defined in the Unicode character set. This makes it possible to:

In order to display or print these symbols, a device must have one or more fonts with good Unicode support installed, and the document (Web page, word processor document, etc.) it is displaying must use one of these fonts.[1]

Unicode version 12.0 has allocated a whole character block at 0x1FA00 for inclusion of extra chess piece representations. This standard points to several new characters being created in this block,[2] including rotated pieces and neutral (neither white nor black) pieces.

Unicode code points and HTML

Traditional chess symbols are part of the Miscellaneous Symbols block. Alternate symbols to support, for example, fairy chess are defined in the Chess Symbols block.

Chess Symbols
Unicode.org chart (PDF)
Name Symbol Code point HTML (decimal) HTML (hex)
white chess king U+2654 ♔ ♔
white chess queen U+2655 ♕ ♕
white chess rook U+2656 ♖ ♖
white chess bishop U+2657 ♗ ♗
white chess knight U+2658 ♘ ♘
white chess pawn U+2659 ♙ ♙
black chess king U+265A ♚ ♚
black chess queen U+265B ♛ ♛
black chess rook U+265C ♜ ♜
black chess bishop U+265D ♝ ♝
black chess knight U+265E ♞ ♞
black chess pawn ♟︎ U+265F ♟ ♟

Chessboard using Unicode symbols

8
7
6
5
4
3
2
1
a b c d e f g h

References

  1. ^ "Test for Unicode support in Web browsers".
  2. ^ http://www.unicode.org/charts/PDF/U1FA00.pdf

External links

  • http://js1k.com/2010-first/demo/750 Playable chess in 1024 bytes of javascript. Entry in JS1k competition by Óscar Toledo G. Usage of Unicode Chess symbols enables a playable design and keep the code less than 1024 bytes.