openFrameworks addon for drawing fonts using signed distance functions (SDF)
// load a .fnt file
font.load("Comic Sans.fnt", 60);
// draw a string
font.draw("Hello World", ofVec2f(20, 60));
- download Hiero (https://github.com/libgdx/libgdx/wiki/Hiero) from https://libgdx.badlogicgames.com/tools.html
- run runnable-hiero.jar
- select a font face
- from the file menu, select "Save BMFont files ..."
- drag the *.fnt and *.png files to your OF application's data folder
- ofxSDFFont was written for 0.9.8 and has not been tested in OF 0.10.0
- ofxSDFFont only runs with the programmable renderer (see examples/simpleexample/src/main.cpp)
- ofxSDFFont does currently work with fnt files containing multiple png files
ofxSDFFont is based on MapBox.js example by Konstantin Käfer https://mapbox.s3.amazonaws.com/kkaefer/sdf/index.html How SDF Fonts work https://www.mapbox.com/blog/text-signed-distance-fields/