You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 19:41:11 +00:00
[Font] Do not use trim with ellipsis in the basic Font string drawing functions.
This commit is contained in:
@@ -288,6 +288,7 @@ Size2 Font::get_string_size(const String &p_text, HorizontalAlignment p_alignmen
|
||||
buffer.instantiate();
|
||||
buffer->set_direction(p_direction);
|
||||
buffer->set_orientation(p_orientation);
|
||||
buffer->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_CHAR);
|
||||
buffer->add_string(p_text, Ref<Font>(this), p_font_size);
|
||||
cache.insert(key, buffer);
|
||||
}
|
||||
@@ -315,6 +316,7 @@ Size2 Font::get_multiline_string_size(const String &p_text, HorizontalAlignment
|
||||
lines_buffer->set_width(p_width);
|
||||
lines_buffer->set_break_flags(p_brk_flags);
|
||||
lines_buffer->set_justification_flags(p_jst_flags);
|
||||
lines_buffer->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_CHAR);
|
||||
cache_wrap.insert(key, lines_buffer);
|
||||
}
|
||||
|
||||
@@ -335,6 +337,7 @@ void Font::draw_string(RID p_canvas_item, const Point2 &p_pos, const String &p_t
|
||||
buffer.instantiate();
|
||||
buffer->set_direction(p_direction);
|
||||
buffer->set_orientation(p_orientation);
|
||||
buffer->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_CHAR);
|
||||
buffer->add_string(p_text, Ref<Font>(this), p_font_size);
|
||||
cache.insert(key, buffer);
|
||||
}
|
||||
@@ -369,6 +372,7 @@ void Font::draw_multiline_string(RID p_canvas_item, const Point2 &p_pos, const S
|
||||
lines_buffer->set_width(p_width);
|
||||
lines_buffer->set_break_flags(p_brk_flags);
|
||||
lines_buffer->set_justification_flags(p_jst_flags);
|
||||
lines_buffer->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_CHAR);
|
||||
cache_wrap.insert(key, lines_buffer);
|
||||
}
|
||||
|
||||
@@ -396,6 +400,7 @@ void Font::draw_string_outline(RID p_canvas_item, const Point2 &p_pos, const Str
|
||||
buffer.instantiate();
|
||||
buffer->set_direction(p_direction);
|
||||
buffer->set_orientation(p_orientation);
|
||||
buffer->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_CHAR);
|
||||
buffer->add_string(p_text, Ref<Font>(this), p_font_size);
|
||||
cache.insert(key, buffer);
|
||||
}
|
||||
@@ -430,6 +435,7 @@ void Font::draw_multiline_string_outline(RID p_canvas_item, const Point2 &p_pos,
|
||||
lines_buffer->set_width(p_width);
|
||||
lines_buffer->set_break_flags(p_brk_flags);
|
||||
lines_buffer->set_justification_flags(p_jst_flags);
|
||||
lines_buffer->set_text_overrun_behavior(TextServer::OVERRUN_TRIM_CHAR);
|
||||
cache_wrap.insert(key, lines_buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user