Added in underline as well.

This commit is contained in:
Adam Harrison
2021-09-24 11:23:49 -04:00
parent 16deedc8a3
commit 940db0f9c7
3 changed files with 9 additions and 5 deletions
+4 -2
View File
@@ -21,7 +21,6 @@ static int f_font_load(lua_State *L) {
}
}
}
lua_pop(L, 1);
lua_getfield(L, 3, "hinting");
if (lua_isstring(L, -1)) {
const char *hinting = lua_tostring(L, -1);
@@ -43,7 +42,10 @@ static int f_font_load(lua_State *L) {
lua_getfield(L, 3, "bold");
if (lua_toboolean(L, -1))
font_style |= FONT_STYLE_BOLD;
lua_pop(L, 1);
lua_getfield(L, 3, "underline");
if (lua_toboolean(L, -1))
font_style |= FONT_STYLE_UNDERLINE;
lua_pop(L, 5);
}
RenFont** font = lua_newuserdata(L, sizeof(RenFont*));
*font = ren_font_load(filename, size, subpixel, font_hinting, font_style);