Author Topic: FreeType-GL plugin (TTF and OTF)  (Read 4380 times)



0 Members and 2 Guests are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1354
    • View Profile
    • Geeks3D.com
FreeType-GL plugin (TTF and OTF)
« on: November 03, 2014, 04:17:00 PM »
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:
Code: [Select]
-- Load an otf file:
font = ftgl_load_font(demo_dir .. "data/BebasNeue.otf", 30)

FRAME script:
Code: [Select]
ftgl_begin(font)
ftgl_print(font, 10, 60, 1.0, 1.0, 0, 1.0, "GLSL Hacker rocks!")
ftgl_end(font)


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).









« Last Edit: November 03, 2014, 04:27:01 PM by JeGX »