summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD. Fleury <dfleury2@free.fr>2017-11-12 11:45:29 +0100
committerD. Fleury <dfleury2@free.fr>2017-11-12 11:45:29 +0100
commitf75028a34c4a9e9659c3a81d204887866b81c97d (patch)
tree6ae54c3c6b783199ed0bb5274db9aa2316e2c47b
parent5dcfa8b615acac2587511597f4d680d804617e12 (diff)
fix: Updates dynamic_font_stb to use get_extension, and memnew
-rw-r--r--scene/resources/dynamic_font_stb.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp
index 91263fb125..4aa47cb664 100644
--- a/scene/resources/dynamic_font_stb.cpp
+++ b/scene/resources/dynamic_font_stb.cpp
@@ -333,8 +333,7 @@ void DynamicFontAtSize::_update_char(CharType p_char) {
//blit to image and texture
{
-
- Image img(tex.texture_size, tex.texture_size, 0, Image::FORMAT_LA8, tex.imgdata);
+ Ref<Image> img = memnew(Image(tex.texture_size, tex.texture_size, 0, Image::FORMAT_LA8, tex.imgdata));
if (tex.texture.is_null()) {
tex.texture.instance();
@@ -518,7 +517,7 @@ bool ResourceFormatLoaderDynamicFont::handles_type(const String &p_type) const {
String ResourceFormatLoaderDynamicFont::get_resource_type(const String &p_path) const {
- String el = p_path.extension().to_lower();
+ String el = p_path.get_extension().to_lower();
if (el == "ttf")
return "DynamicFontData";
return "";