4. Download & Installation¶
4.1. Downloads¶
Download the zip:
Or get the code from GitHub:
> git clone https://github.com/JCash/fontcreator.git
4.2. Prerequisites¶
The FontCreator should work on any platform that supports these prerequisites:
Optional installations:
Note
Note that the PIL package is only necessary if you want to use it for saving to a standard image format (e.g. PNG, TGA etc). The examples use PIL.
For Linux and Mac, you can get these as regular packages. (On Mac using macports)
4.3. Install¶
Once you have the unarchived the package, make sure that the paths are set correctly and that the freetype shared library is found
Windows:
set PATH=%PATH%;C:\freetypelibpath
Linux:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib
Mac:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib
4.4. Building Code¶
The font creator comes with a code for some image processing. These are easily built by calling the appropriate compile script:
> ./compile.sh
Once the code is built and the library path is set, you can test that the tool by compiling an example file:
> python fontcreator.py -i examples/00_pixel.fontinfo -o build/00_pixel.fontinfo
If all goes well, you should now be able to find two files build/00_pixel.png and build/00_pixel.json
There are versions of the compile script for Win6 and Win32, but they don’t build the demo app. You can easily fix that yourself if you provide the libpng and the libglfw.
4.5. Building Examples¶
You can also build the examples to test the font creator:
> python examples/build.py
The fontcreator comes with a script that also sets the path for you:
> ./build_examples.sh
4.6. Building Documentation¶
To build the documentation:
> ./build_doc.sh
> open doc/build/html/index.html
4.7. The Demo app¶
The demo app shows the sdf rendering of a texture created with the FontCreator. Keys:
- Zoom - Left Shift + Left Mouse + Mouse Move
- Rotate - Left Control + Left Mouse + Mouse Move
- Pan - Left Mouse + Mouse Move