Added a smoothing and strikethrough option to font loading. (#1087)

* Added a smoothing option to font loading.
* Added a font strikethrough option to font loading.
* Fixed underline applying incorrectly in cases of non-underlined fallback fonts being used.

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
This commit is contained in:
Aqil Contractor
2022-08-20 16:15:08 -04:00
committed by GitHub
co-authored by Guldoman
parent f07b62f852
commit 9b1bfeacac
6 changed files with 41 additions and 6 deletions
+7
View File
@@ -58,6 +58,13 @@ static int font_get_options(
lua_getfield(L, 3, "underline");
if (lua_toboolean(L, -1))
style_local |= FONT_STYLE_UNDERLINE;
lua_getfield(L, 3, "smoothing");
if (lua_toboolean(L, -1))
style_local |= FONT_STYLE_SMOOTH;
lua_getfield(L, 3, "strikethrough");
if (lua_toboolean(L, -1))
style_local |= FONT_STYLE_STRIKETHROUGH;
lua_pop(L, 5);
if (style_local != 0)