diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-10-28 22:09:37 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-28 22:09:37 -0300 |
commit | a65481dd35615a4371ca63a4661742abe182cb23 (patch) | |
tree | 78db1fcd329a1f74a2f84f687fd4a5405a9fdf2c /scene/resources/dynamic_font.cpp | |
parent | 8ab9b397070174aab7b20cdcd97506db25fb919d (diff) |
Update scene/resources/dynamic_font.cpp
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Diffstat (limited to 'scene/resources/dynamic_font.cpp')
-rw-r--r-- | scene/resources/dynamic_font.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index a0ce6e1194..d76d364737 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -459,6 +459,8 @@ DynamicFontAtSize::TexturePosition DynamicFontAtSize::_find_texture_pos_for_glyp uint8_t *w = tex.imgdata.ptrw(); ERR_FAIL_COND_V(texsize * texsize * p_color_size > tex.imgdata.size(), ret); + // Initialize the texture to all-white pixels to prevent artifacts when the + // font is displayed at a non-default scale with filtering enabled. if (p_color_size == 2) { for (int i = 0; i < texsize * texsize * p_color_size; i += 2) { w[i + 0] = 255; |