How to use the font tool to create the Asian fonts
NOTE: THIS IS NOT NECESSARY WITH CURRENT GIT ANYMORE. Once we have released with TTF, this page can be removed!
- You need to fetch the latest source, and compile it with the option -DFONT_TOOL=yes
- Open .../cmake_build/bin/font_tool .tools/font_tool/po_list
- Set charset to "All avaliable" (I don't have this option and had to set it to "unknown" to find the font).
- Set Font to WenQuanMicroHei.
- Set font size to 24pt (or any other you like :) ).
- Make sure "alpha" option is checked.
- There are two check boxes in GUI, "Export used characters only" and "Exclude basic latin characters", the latter which is useful for non-latin charsets. Make sure the former is checked, and check the latter if applicable (typically it should be set).
- Set max width and height to 512.
- Set file name to the font name without spaces (wqyMicroHei).
- Set file format to "png".
- Press create and then save(!!). Copy the wqyMicroHei*.png files to stk-code/data/fonts; and wqyMicroHei.xml to stk-code/data/fonts/StkChineseFont.xml
For quick testing, rename stk-code/data/fonts/StkFont.xml and rename your new font's XML to StkFont.xml, and move it and the generated PNG images over. Open the game, and marvel at a new font.