mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user