Safeguard against BitMap fonts in the CanvasItem editor
Co-authored-by: ArrowInAKnee <gatexxl@gmail.com>
(cherry picked from commit 8fe6fceb02
)
This commit is contained in:
parent
ad77c9a64d
commit
86f946043a
@ -4081,8 +4081,10 @@ void CanvasItemEditor::_notification(int p_what) {
|
|||||||
anchor_mode_button->set_icon(get_icon("Anchor", "EditorIcons"));
|
anchor_mode_button->set_icon(get_icon("Anchor", "EditorIcons"));
|
||||||
|
|
||||||
Ref<DynamicFont> font = zoom_reset->get_font("font")->duplicate(false);
|
Ref<DynamicFont> font = zoom_reset->get_font("font")->duplicate(false);
|
||||||
|
if (font.is_valid()) {
|
||||||
font->set_outline_size(1);
|
font->set_outline_size(1);
|
||||||
font->set_outline_color(Color(0, 0, 0));
|
font->set_outline_color(Color(0, 0, 0));
|
||||||
|
}
|
||||||
zoom_reset->add_font_override("font", font);
|
zoom_reset->add_font_override("font", font);
|
||||||
zoom_reset->add_color_override("font_color", Color(1, 1, 1));
|
zoom_reset->add_color_override("font_color", Color(1, 1, 1));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user