We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 58e4e34 + 33eb772 commit 0e3dbbaCopy full SHA for 0e3dbba
scene/gui/label.cpp
@@ -710,10 +710,10 @@ void Label::_notification(int p_what) {
710
Vector2 line_offset = _get_line_rect(p, i).position;
711
ofs.x = line_offset.x;
712
713
- int asc = TS->shaped_text_get_ascent(line_rid);
714
- int dsc = TS->shaped_text_get_descent(line_rid);
+ double asc = TS->shaped_text_get_ascent(line_rid);
+ double dsc = TS->shaped_text_get_descent(line_rid);
715
if (asc + dsc < font_h) {
716
- int diff = font_h - (asc + dsc);
+ double diff = font_h - (asc + dsc);
717
asc += diff / 2;
718
dsc += diff - (diff / 2);
719
}
0 commit comments