1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix regressions from Font refactor

Fixes `p_font.is_null()` errors due to incorrect resource type used.
Fixes code editor font not set correctly, and OpenType features applied to the wrong font.
This commit is contained in:
bruvzg
2022-07-07 15:11:08 +03:00
parent 95ddc8cccc
commit a319e6e623
4 changed files with 95 additions and 82 deletions

View File

@@ -3697,7 +3697,7 @@ void CanvasItemEditor::_draw_transform_message() {
return;
}
Ref<FontFile> font = get_theme_font(SNAME("font"), SNAME("Label"));
Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
Point2 msgpos = Point2(RULER_WIDTH + 5 * EDSCALE, viewport->get_size().y - 20 * EDSCALE);
viewport->draw_string(font, msgpos + Point2(1, 1), transform_message, HORIZONTAL_ALIGNMENT_LEFT, -1, font_size, Color(0, 0, 0, 0.8));