Added an optional spacing argument to love.graphics.newImageFont, allowing additional spacing (positive or negative) to be applied to all glyphs rendered using that font.

This commit is contained in:
Alex Szpakowski
2015-03-11 18:28:22 -03:00
parent b1f4beac56
commit a119e6a862
6 changed files with 28 additions and 19 deletions
+2 -1
View File
@@ -162,8 +162,9 @@ int w_newImageRasterizer(lua_State *L)
image::ImageData *d = luax_checktype<image::ImageData>(L, 1, IMAGE_IMAGE_DATA_ID);
std::string glyphs = luax_checkstring(L, 2);
int extraspacing = luaL_optint(L, 3, 0);
luax_catchexcept(L, [&](){ t = instance()->newImageRasterizer(d, glyphs); });
luax_catchexcept(L, [&](){ t = instance()->newImageRasterizer(d, glyphs, extraspacing); });
luax_pushtype(L, FONT_RASTERIZER_ID, t);
t->release();