Merge pull request #17145 from poke1024/fix17139

Fix regression through fa98637aca
This commit is contained in:
Rémi Verschelde 2018-03-01 19:18:12 +01:00 committed by GitHub
commit 98609c3993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -319,6 +319,11 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
ENSURE_WIDTH(w);
if (p_mode == PROCESS_CACHE) {
line_ascent = ascent;
line_descent = descent;
}
if (end && c[end - 1] == ' ') {
if (p_mode == PROCESS_CACHE) {
spaces_size += font->get_char_size(' ').width;