summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/text_server_adv/dynamic_font_adv.cpp4
-rw-r--r--modules/text_server_fb/dynamic_font_fb.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/text_server_adv/dynamic_font_adv.cpp b/modules/text_server_adv/dynamic_font_adv.cpp
index 08c4ad2727..99d78a5299 100644
--- a/modules/text_server_adv/dynamic_font_adv.cpp
+++ b/modules/text_server_adv/dynamic_font_adv.cpp
@@ -432,8 +432,8 @@ DynamicFontDataAdvanced::Character DynamicFontDataAdvanced::bitmap_to_character(
}
Character chr;
- chr.align = Vector2(xofs, -yofs) * p_data->scale_color_font / oversampling;
- chr.advance = advance * p_data->scale_color_font / oversampling;
+ chr.align = (Vector2(xofs, -yofs) * p_data->scale_color_font / oversampling).round();
+ chr.advance = (advance * p_data->scale_color_font / oversampling).round();
chr.texture_idx = tex_pos.index;
chr.found = true;
diff --git a/modules/text_server_fb/dynamic_font_fb.cpp b/modules/text_server_fb/dynamic_font_fb.cpp
index 6731870e8f..ca9e5b580b 100644
--- a/modules/text_server_fb/dynamic_font_fb.cpp
+++ b/modules/text_server_fb/dynamic_font_fb.cpp
@@ -317,8 +317,8 @@ DynamicFontDataFallback::Character DynamicFontDataFallback::bitmap_to_character(
}
Character chr;
- chr.align = Vector2(xofs, -yofs) * p_data->scale_color_font / oversampling;
- chr.advance = advance * p_data->scale_color_font / oversampling;
+ chr.align = (Vector2(xofs, -yofs) * p_data->scale_color_font / oversampling).round();
+ chr.advance = (advance * p_data->scale_color_font / oversampling).round();
chr.texture_idx = tex_pos.index;
chr.found = true;