FreeType-GL plugin (TTF and OTF)

Started by JeGX, November 03, 2014, 04:17:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


One of the coolest features of GLSL Hacker 0.8.0 is the support of FreeType GL via a dedicated plugin. Thanks to this new plugin, GLSL Hacker can now load any TTF (True Type Font) or OTF (Open Type Font) file. I also added a small Lua lib (gx_font.lua in the libs/lua/ folder of glsl hacker) to make things easier.

INIT script:

-- Load an otf file:
font = ftgl_load_font(demo_dir .. "data/BebasNeue.otf", 30)

FRAME script:

ftgl_print(font, 10, 60, 1.0, 1.0, 0, 1.0, "GLSL Hacker rocks!")

Demos are available in the host_api/freetype-gl/ folder of the code sample pack v2.25.0.

The plugin is available for all platforms (Windows, OSX and Linux).