[Font] Add option to disable embedded bitmaps loading.
This commit is contained in:
@@ -80,6 +80,9 @@ void TextServerExtension::_bind_methods() {
|
||||
GDVIRTUAL_BIND(_font_set_antialiasing, "font_rid", "antialiasing");
|
||||
GDVIRTUAL_BIND(_font_get_antialiasing, "font_rid");
|
||||
|
||||
GDVIRTUAL_BIND(_font_set_disable_embedded_bitmaps, "font_rid", "disable_embedded_bitmaps");
|
||||
GDVIRTUAL_BIND(_font_get_disable_embedded_bitmaps, "font_rid");
|
||||
|
||||
GDVIRTUAL_BIND(_font_set_generate_mipmaps, "font_rid", "generate_mipmaps");
|
||||
GDVIRTUAL_BIND(_font_get_generate_mipmaps, "font_rid");
|
||||
|
||||
@@ -518,6 +521,16 @@ TextServer::FontAntialiasing TextServerExtension::font_get_antialiasing(const RI
|
||||
return ret;
|
||||
}
|
||||
|
||||
void TextServerExtension::font_set_disable_embedded_bitmaps(const RID &p_font_rid, bool p_disable_embedded_bitmaps) {
|
||||
GDVIRTUAL_CALL(_font_set_disable_embedded_bitmaps, p_font_rid, p_disable_embedded_bitmaps);
|
||||
}
|
||||
|
||||
bool TextServerExtension::font_get_disable_embedded_bitmaps(const RID &p_font_rid) const {
|
||||
bool ret = false;
|
||||
GDVIRTUAL_CALL(_font_get_disable_embedded_bitmaps, p_font_rid, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void TextServerExtension::font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) {
|
||||
GDVIRTUAL_CALL(_font_set_generate_mipmaps, p_font_rid, p_generate_mipmaps);
|
||||
}
|
||||
|
||||
@@ -128,6 +128,11 @@ public:
|
||||
GDVIRTUAL2(_font_set_antialiasing, RID, TextServer::FontAntialiasing);
|
||||
GDVIRTUAL1RC(TextServer::FontAntialiasing, _font_get_antialiasing, RID);
|
||||
|
||||
virtual void font_set_disable_embedded_bitmaps(const RID &p_font_rid, bool p_disable_embedded_bitmaps) override;
|
||||
virtual bool font_get_disable_embedded_bitmaps(const RID &p_font_rid) const override;
|
||||
GDVIRTUAL2(_font_set_disable_embedded_bitmaps, RID, bool);
|
||||
GDVIRTUAL1RC(bool, _font_get_disable_embedded_bitmaps, RID);
|
||||
|
||||
virtual void font_set_generate_mipmaps(const RID &p_font_rid, bool p_generate_mipmaps) override;
|
||||
virtual bool font_get_generate_mipmaps(const RID &p_font_rid) const override;
|
||||
GDVIRTUAL2(_font_set_generate_mipmaps, RID, bool);
|
||||
|
||||
Reference in New Issue
Block a user