Merge pull request #30451 from raphael10241024/fix_outline

Fix DynamicFont outline does not draw using draw_char
This commit is contained in:
Rémi Verschelde 2019-07-10 13:38:20 +02:00 committed by GitHub
commit 9496e29326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -968,6 +968,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_char.length() != 1, 0);
ERR_FAIL_COND_V(p_font.is_null(), 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); return p_font->draw_char(canvas_item, p_pos, p_char[0], p_next.c_str()[0], p_modulate);
} }