summaryrefslogtreecommitdiff
path: root/scene/gui/rich_text_label.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-07 15:11:08 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-07 15:11:08 +0300
commita319e6e6232f3e6b9056bd26822f5aa3738b6cd6 (patch)
treee10eb7c1258533acc38f7f700084203da197e92f /scene/gui/rich_text_label.cpp
parent95ddc8cccc2ad14ff8731b96f3764c88d202f9d3 (diff)
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.
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r--scene/gui/rich_text_label.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 2441279797..05824d54f1 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -2081,7 +2081,7 @@ Ref<Font> RichTextLabel::_find_font(Item *p_item) {
fontitem = fontitem->parent;
}
- return Ref<FontFile>();
+ return Ref<Font>();
}
int RichTextLabel::_find_font_size(Item *p_item) {
@@ -4002,7 +4002,7 @@ void RichTextLabel::append_text(const String &p_bbcode) {
if (subtag_a.size() == 2) {
if (subtag_a[0] == "name" || subtag_a[0] == "n") {
String fnt = subtag_a[1];
- Ref<Font> font_data = ResourceLoader::load(fnt, "FontFile");
+ Ref<Font> font_data = ResourceLoader::load(fnt, "Font");
if (font_data.is_valid()) {
fc->set_base_font(font_data);
}