Merge pull request #12858 from dfleury2/master

fix: Updates dynamic_font_stb to use get_extension, and memnew
This commit is contained in:
Rémi Verschelde 2017-11-12 21:06:03 +01:00 committed by GitHub
commit e9392dd876
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 "";