PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` FreeType Tutorial / III

FreeType Tutorial / III

III. Examples

For completeness, here again a link to the example used and explained in the first part of the tutorial.

Erik Möller contributed a very nice C++ example that shows renderer callbacks in action to draw a coloured glyph with a differently coloured outline. The source code can be found here.

Another example demonstrates how to use FreeType's stand-alone B/W rasterizer, ftraster.c. You need files from FreeType version 2.3.10 or newer.

Róbert Márki contributed a small Qt demonstration program (together with its qmake file) that shows both direct rendering with a callback and rendering with a buffer, yielding the same result. You need FreeType 2.4.3 or newer.

Here is some simple C++ code (contributed by Static Jobs LLC) that uses FT_Outline_Decompose to convert a glyph outline to the SVG format. As an example, here is the resulting file of the call

example5 LiberationSerif-Bold.ttf @

(you can find the Liberation font family here).

Last update: 8-Sep-2016