diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-01-19 10:50:43 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-01-31 20:10:50 +0200 |
commit | c75923498e9a60466a0dde7a5fed3dd0108a790f (patch) | |
tree | 953d980edc138b39eec971d8cc0bb7ee5d3d9631 /modules/text_server_adv/dynamic_font_adv.cpp | |
parent | 5525cd85c60455b0bb9716bbef0ad2ad8111d752 (diff) |
Use integer coordinates for the font glyphs rendering.
Diffstat (limited to 'modules/text_server_adv/dynamic_font_adv.cpp')
-rw-r--r-- | modules/text_server_adv/dynamic_font_adv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/text_server_adv/dynamic_font_adv.cpp b/modules/text_server_adv/dynamic_font_adv.cpp index fcefa60d98..5a16158c0f 100644 --- a/modules/text_server_adv/dynamic_font_adv.cpp +++ b/modules/text_server_adv/dynamic_font_adv.cpp @@ -946,7 +946,7 @@ Vector2 DynamicFontDataAdvanced::draw_glyph(RID p_canvas, int p_size, const Vect ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2()); if (ch.texture_idx != -1) { - Point2 cpos = p_pos; + Point2i cpos = p_pos; cpos += ch.align; Color modulate = p_color; if (FT_HAS_COLOR(fds->face)) { @@ -977,7 +977,7 @@ Vector2 DynamicFontDataAdvanced::draw_glyph_outline(RID p_canvas, int p_size, in ERR_FAIL_COND_V(ch.texture_idx < -1 || ch.texture_idx >= fds->textures.size(), Vector2()); if (ch.texture_idx != -1) { - Point2 cpos = p_pos; + Point2i cpos = p_pos; cpos += ch.align; Color modulate = p_color; if (FT_HAS_COLOR(fds->face)) { |