Unicode values for chessmen

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Unicode values for chessmen

Post by sje »

FAN (Figurine Algebraic Notation) is the same an SAN except chessmen icons are used instead of piece letters. Fan can be expressed using both white and black chessman Unicode glyphs or just the white ones.

For those interested in using Unicode for FAN output, here are the decimal values of the twelve Unicode glyphs:

Code: Select all

;; -- Unicode constants for figurine notation

(defconstant unicode-wp (code-char 9817))
(defconstant unicode-wn (code-char 9816))
(defconstant unicode-wb (code-char 9815))
(defconstant unicode-wr (code-char 9814))
(defconstant unicode-wq (code-char 9813))
(defconstant unicode-wk (code-char 9812))
(defconstant unicode-bp (code-char 9823))
(defconstant unicode-bn (code-char 9822))
(defconstant unicode-bb (code-char 9821))
(defconstant unicode-br (code-char 9820))
(defconstant unicode-bq (code-char 9819))
(defconstant unicode-bk (code-char 9818))
One drawback is that sometimes the icons are not as legible as piece letters when using a low resolution output or a small font size. Here is a sample output from Lisp of all twelve Unicode chessmen in your browser with default size and font selections:

Code: Select all

* (domans (man) (format t "~C" (man->unicode man)))
♙♘♗♖♕♔♟♞♝♜♛♚
NIL
User avatar
smrf
Posts: 484
Joined: Mon Mar 13, 2006 11:08 am
Location: Klein-Gerau, Germany

Re: Unicode values for chessmen

Post by smrf »

Unfortunately 10x8 Capablanca Cess pieces have not been supported there.
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Unicode values for chessmen

Post by sje »

smrf wrote:Unfortunately 10x8 Capablanca Cess pieces have not been supported there.
That's okay. You could always use KAN (Kitten Algebraic Notation).

See: http://abstrusegoose.com/345