summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaelHunter <Raphael10241024@gmail.com>2019-07-09 12:42:59 +0800
committerRaphaelHunter <Raphael10241024@gmail.com>2019-07-09 12:42:59 +0800
commite57d0c8e608707a952c19609974613e53fe4f669 (patch)
tree06f10041e545892537af085907cb7def9ebf89e2
parent56269e2db835e50a4cf2681bb73c44ae41fcca10 (diff)
Fix DynamaicFont outline does not draw using draw_char
-rw-r--r--scene/2d/canvas_item.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 23f6404e3e..8704bb16db 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -928,6 +928,9 @@ float CanvasItem::draw_char(const Ref<Font> &p_font, const Point2 &p_pos, const
ERR_FAIL_COND_V(p_char.length() != 1, 0);
ERR_FAIL_COND_V(p_font.is_null(), 0);
+ if (p_font->has_outline()) {
+ p_font->draw_char(canvas_item, p_pos, p_char[0], p_next.c_str()[0], Color(1, 1, 1), true);
+ }
return p_font->draw_char(canvas_item, p_pos, p_char[0], p_next.c_str()[0], p_modulate);
}