Skip to content

Commit

Permalink
Safeguard against BitMap fonts in the CanvasItem editor
Browse files Browse the repository at this point in the history
Co-authored-by: ArrowInAKnee <[email protected]>
  • Loading branch information
YuriSizov and arrowinaknee committed Oct 4, 2021
1 parent 72a922e commit 8fe6fce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4218,8 +4218,10 @@ void CanvasItemEditor::_notification(int p_what) {
anchor_mode_button->set_icon(get_icon("Anchor", "EditorIcons"));

Ref<DynamicFont> font = zoom_reset->get_font("font")->duplicate(false);
font->set_outline_size(1);
font->set_outline_color(Color(0, 0, 0));
if (font.is_valid()) {
font->set_outline_size(1);
font->set_outline_color(Color(0, 0, 0));
}
zoom_reset->add_font_override("font", font);
zoom_reset->add_color_override("font_color", Color(1, 1, 1));

Expand Down

0 comments on commit 8fe6fce

Please sign in to comment.