summaryrefslogtreecommitdiffstats
path: root/scene/gui/code_edit.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-01-10 10:13:22 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-02-12 19:55:52 +0200
commit29199579f780f4f66350e1962926c08b2ddcf65b (patch)
tree4e722851ab0cdd71401e87c4b34c92d1c2630324 /scene/gui/code_edit.cpp
parentd3a6b6daaab4c8dfb7bdf35cc2fe2145ae6c22a1 (diff)
downloadredot-engine-29199579f780f4f66350e1962926c08b2ddcf65b.tar.gz
Add sub-pixel glyph positioning support.
Diffstat (limited to 'scene/gui/code_edit.cpp')
-rw-r--r--scene/gui/code_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 8cb8a78e8d..c4e67c2951 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -84,7 +84,7 @@ void CodeEdit::_notification(int p_what) {
if (line_length_guideline_columns.size() > 0) {
const int xmargin_beg = style_normal->get_margin(SIDE_LEFT) + get_total_gutter_width();
const int xmargin_end = size.width - style_normal->get_margin(SIDE_RIGHT) - (is_drawing_minimap() ? get_minimap_width() : 0);
- const int char_size = Math::round(font->get_char_size('0', 0, font_size).width);
+ const float char_size = font->get_char_size('0', 0, font_size).width;
for (int i = 0; i < line_length_guideline_columns.size(); i++) {
const int xoffset = xmargin_beg + char_size * (int)line_length_guideline_columns[i] - get_h_scroll();