In the previous blog post there was a Christmas postcard created by the help of LibreLogo, the simplified programming interface of LibreOffice Writer for graphic design. Now I will show more DTP-related examples: typesetting chessboards with high print quality in LibreOffice 4.0, and a special Christmas ball. (It will be possible to test these examples in the next beta version of LibreOffice 4.0 under Windows, too).
Typesetting chessboards using special chess fonts. This example (see first picture and PDF, ODT with source code) uses a special TrueType font, Chess Merida, filled with characters of the same size (partially combined with black hatched background). The LibreLogo program puts every characters into different text shapes using the LABEL command. The text shapes are grouped by the special PICTURE command of LibreLogo, so the result will be a single grouped shape (use the ungroup icon of the Drawing Object Properties toolbar to remove this grouping). The program asks for the point size of the figures and the positions of the chess figures in chess notation. Decoding of the standard notation is solved by only a few program lines, thanks to the compact Python data structures of LibreLogo.
Typesetting chessboards only with standard Unicode characters, by notation or manual positioning. This chessboard drawing program depends only from standard Unicode chess characters (see second picture, and PDF, ODT with source code). To get real white figures from the transparent characters of the Unicode white chess figures the program draws two invisible square shapes for a figure, and put a black chess figure character in white into the background square, and the white chess character into the foreground square by the TEXT commands (see picture). The two squares are grouped by PICTURE. Without the given notation, the program draws a full chessboard, and it’s possible to move the figures to the requested positions manually (frames of the invisible squares allow precise positioning).
Christmas song on a Christmas ball. These beautiful Christmas balls are composed of 5-5 paper stripes. The stripes contain plain and upside-down lines of a Christmas song (English version with instructions: PDF, ODT with source code). The Christmas balls (and the Christmas stars of the previous post) were very popular on the Christmas Fair yesterday, thanks for the nice work of Veronika Bognár and Éva Bozsó.