diff options
Diffstat (limited to 'scene/resources/dynamic_font.cpp')
-rw-r--r-- | scene/resources/dynamic_font.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 3503d3bdb1..bb40c5ed93 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -66,11 +66,22 @@ void DynamicFontData::set_font_path(const String& p_path) { font_path=p_path; } +String DynamicFontData::get_font_path() const { + return font_path; +} + void DynamicFontData::set_force_autohinter(bool p_force) { force_autohinter=p_force; } +void DynamicFontData::_bind_methods() { + ObjectTypeDB::bind_method(_MD("set_font_path","path"),&DynamicFontData::set_font_path); + ObjectTypeDB::bind_method(_MD("get_font_path"),&DynamicFontData::get_font_path); + + ADD_PROPERTY(PropertyInfo(Variant::STRING,"font_path",PROPERTY_HINT_FILE,"*.ttf,*.otf"),_SCS("set_font_path"),_SCS("get_font_path")); +} + DynamicFontData::DynamicFontData() { @@ -544,7 +555,7 @@ void DynamicFontAtSize::_update_char(CharType p_char) { if (tex.texture.is_null()) { tex.texture.instance(); - tex.texture->create_from_image(img,0/*Texture::FLAG_FILTER*/); + tex.texture->create_from_image(img,Texture::FLAG_VIDEO_SURFACE); } else { tex.texture->set_data(img); //update } |