Merge pull request #79844 from bruvzg/btn_el_out
[Text Server] Fix ellipsis outline drawing
This commit is contained in:
commit
ee06d3e83f
|
@ -1539,7 +1539,7 @@ void TextServer::shaped_text_draw_outline(const RID &p_shaped, const RID &p_canv
|
||||||
if (rtl && ellipsis_pos >= 0) {
|
if (rtl && ellipsis_pos >= 0) {
|
||||||
for (int i = ellipsis_gl_size - 1; i >= 0; i--) {
|
for (int i = ellipsis_gl_size - 1; i >= 0; i--) {
|
||||||
for (int j = 0; j < ellipsis_glyphs[i].repeat; j++) {
|
for (int j = 0; j < ellipsis_glyphs[i].repeat; j++) {
|
||||||
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);
|
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);
|
||||||
if (orientation == ORIENTATION_HORIZONTAL) {
|
if (orientation == ORIENTATION_HORIZONTAL) {
|
||||||
ofs.x += ellipsis_glyphs[i].advance;
|
ofs.x += ellipsis_glyphs[i].advance;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1602,7 +1602,7 @@ void TextServer::shaped_text_draw_outline(const RID &p_shaped, const RID &p_canv
|
||||||
if (!rtl && ellipsis_pos >= 0) {
|
if (!rtl && ellipsis_pos >= 0) {
|
||||||
for (int i = 0; i < ellipsis_gl_size; i++) {
|
for (int i = 0; i < ellipsis_gl_size; i++) {
|
||||||
for (int j = 0; j < ellipsis_glyphs[i].repeat; j++) {
|
for (int j = 0; j < ellipsis_glyphs[i].repeat; j++) {
|
||||||
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);
|
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);
|
||||||
if (orientation == ORIENTATION_HORIZONTAL) {
|
if (orientation == ORIENTATION_HORIZONTAL) {
|
||||||
ofs.x += ellipsis_glyphs[i].advance;
|
ofs.x += ellipsis_glyphs[i].advance;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue