Merge pull request #17632 from endragor/fix-resize-font-update

Fix oversampled font artifacts after resize
This commit is contained in:
Rémi Verschelde 2018-03-20 11:12:28 +01:00 committed by GitHub
commit e751fef206
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -498,14 +498,14 @@ bool SceneTree::idle(float p_time) {
Size2 win_size = Size2(OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height);
if (win_size != last_screen_size) {
last_screen_size = win_size;
_update_root_rect();
if (use_font_oversampling) {
DynamicFontAtSize::font_oversampling = OS::get_singleton()->get_window_size().width / root->get_visible_rect().size.width;
DynamicFont::update_oversampling();
}
last_screen_size = win_size;
_update_root_rect();
emit_signal("screen_resized");
}