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]>
(cherry picked from commit 8fe6fce)
  • Loading branch information
YuriSizov authored and akien-mga committed Jul 3, 2022
1 parent ad77c9a commit 86f9460
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 @@ -4081,8 +4081,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 86f9460

Please sign in to comment.