|
@@ -525,11 +525,7 @@ Size2 TextParagraph::get_non_wrapped_size() const {
|
|
|
_THREAD_SAFE_METHOD_
|
|
|
|
|
|
const_cast<TextParagraph *>(this)->_shape_lines();
|
|
|
- if (TS->shaped_text_get_orientation(rid) == TextServer::ORIENTATION_HORIZONTAL) {
|
|
|
- return Size2(TS->shaped_text_get_size(rid).x, TS->shaped_text_get_size(rid).y);
|
|
|
- } else {
|
|
|
- return Size2(TS->shaped_text_get_size(rid).x, TS->shaped_text_get_size(rid).y);
|
|
|
- }
|
|
|
+ return TS->shaped_text_get_size(rid);
|
|
|
}
|
|
|
|
|
|
Size2 TextParagraph::get_size() const {
|
|
@@ -675,11 +671,7 @@ Size2 TextParagraph::get_line_size(int p_line) const {
|
|
|
|
|
|
const_cast<TextParagraph *>(this)->_shape_lines();
|
|
|
ERR_FAIL_COND_V(p_line < 0 || p_line >= (int)lines_rid.size(), Size2());
|
|
|
- if (TS->shaped_text_get_orientation(lines_rid[p_line]) == TextServer::ORIENTATION_HORIZONTAL) {
|
|
|
- return Size2(TS->shaped_text_get_size(lines_rid[p_line]).x, TS->shaped_text_get_size(lines_rid[p_line]).y);
|
|
|
- } else {
|
|
|
- return Size2(TS->shaped_text_get_size(lines_rid[p_line]).x, TS->shaped_text_get_size(lines_rid[p_line]).y);
|
|
|
- }
|
|
|
+ return TS->shaped_text_get_size(lines_rid[p_line]);
|
|
|
}
|
|
|
|
|
|
Vector2i TextParagraph::get_line_range(int p_line) const {
|