slages / love-imgui

imgui module for the LÖVE game engine
MIT License
321 stars 61 forks source link

Custom binding for setting global font #10

Closed nkorth closed 7 years ago

nkorth commented 7 years ago

This is a quick-and-dirty way to change the font, without getting into making a Lua type for ImFont or anything like that. The Lua function signature is:

imgui.SetGlobalFontFromFileTTF(path, size_pixels, spacing_x, spacing_y, oversample_x, oversample_y)

string path
number size_pixels
number spacing_x (0)
number spacing_y (0)
number oversample_x (1)
number oversample_y (1)

As the function name hopefully suggests, this should probably only be called in love.load.