Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ee06d3e

Browse files
committedJul 24, 2023
Merge pull request #79844 from bruvzg/btn_el_out
[Text Server] Fix ellipsis outline drawing
2 parents 0cbdad4 + 55c8cdb commit ee06d3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎servers/text_server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ void TextServer::shaped_text_draw_outline(const RID &p_shaped, const RID &p_canv
15391539
if (rtl && ellipsis_pos >= 0) {
15401540
for (int i = ellipsis_gl_size - 1; i >= 0; i--) {
15411541
for (int j = 0; j < ellipsis_glyphs[i].repeat; j++) {
1542-
font_draw_glyph(ellipsis_glyphs[i].font_rid, p_canvas, ellipsis_glyphs[i].font_size, ofs + Vector2(ellipsis_glyphs[i].x_off, ellipsis_glyphs[i].y_off), ellipsis_glyphs[i].index, p_color);
1542+
font_draw_glyph_outline(ellipsis_glyphs[i].font_rid, p_canvas, ellipsis_glyphs[i].font_size, p_outline_size, ofs + Vector2(ellipsis_glyphs[i].x_off, ellipsis_glyphs[i].y_off), ellipsis_glyphs[i].index, p_color);
15431543
if (orientation == ORIENTATION_HORIZONTAL) {
15441544
ofs.x += ellipsis_glyphs[i].advance;
15451545
} else {
@@ -1602,7 +1602,7 @@ void TextServer::shaped_text_draw_outline(const RID &p_shaped, const RID &p_canv
16021602
if (!rtl && ellipsis_pos >= 0) {
16031603
for (int i = 0; i < ellipsis_gl_size; i++) {
16041604
for (int j = 0; j < ellipsis_glyphs[i].repeat; j++) {
1605-
font_draw_glyph(ellipsis_glyphs[i].font_rid, p_canvas, ellipsis_glyphs[i].font_size, ofs + Vector2(ellipsis_glyphs[i].x_off, ellipsis_glyphs[i].y_off), ellipsis_glyphs[i].index, p_color);
1605+
font_draw_glyph_outline(ellipsis_glyphs[i].font_rid, p_canvas, ellipsis_glyphs[i].font_size, p_outline_size, ofs + Vector2(ellipsis_glyphs[i].x_off, ellipsis_glyphs[i].y_off), ellipsis_glyphs[i].index, p_color);
16061606
if (orientation == ORIENTATION_HORIZONTAL) {
16071607
ofs.x += ellipsis_glyphs[i].advance;
16081608
} else {

0 commit comments

Comments
 (0)
Please sign in to comment.