%!PS
% load font file
% (you don't need this, if you have a .pfa file, in which case
% you can directly specify it on the gs command line:
% $ gs -q -dNODISPLAY ZURIFB__.pfa 683209.ps )
(./ZURIFB__.pfb) % or whatever your .pfb file is
(r) file true /PFBDecode filter cvx
mark exch exec cleartomark
/ZurichFigurine-Bold findfont 12 scalefont setfont
/print_width {
dup
( \(" " ) dup 4 4 -1 roll putinterval print % '("X" '
stringwidth pop 20 string cvs print % width
(\)) print % ')'
} bind def
/i2s { % int/char to string
( ) dup 0 4 -1 roll put
} bind def
(\(setq ZURIFB__afm12 '\() = % 1st line
(RNBQKO-x+.abcdefgh1234567890) { % char list
i2s dup
print_width
(0) ne {()=} if % "\n", unless last char
} forall
(\)\)) = % "))\n"
quit
####
$ gs -q -dNODISPLAY 683209.ps
####
(setq ZURIFB__afm12 '(
("R" 8.66016)
("N" 8.66016)
("B" 8.00391)
("Q" 9.33594)
("K" 8.00391)
("O" 9.33594)
("-" 3.99219)
("x" 6.0)
("+" 7.00781)
("." 3.33594)
("a" 6.67188)
("b" 6.67188)
("c" 6.0)
("d" 6.67188)
("e" 6.67188)
("f" 3.33594)
("g" 6.67188)
("h" 6.67188)
("1" 6.67188)
("2" 6.67188)
("3" 6.67188)
("4" 6.67188)
("5" 6.67188)
("6" 6.67188)
("7" 6.67188)
("8" 6.67188)
("9" 6.67188)
("0" 6.67188)))
####
%!PS
/center {
% move cursor position to the left by half the width
dup stringwidth pop 2 div neg 0 rmoveto
} bind def
/Helvetica findfont 12 scalefont setfont
% draw "ABC" left-aligned (as normal) at (100,100)
100 100 moveto (ABC) show
% draw "ABC" horizontally centered around (100,100)
100 100 moveto (ABC) center show