Add font import flag to toggle modulation of colored glyphs.
This commit is contained in:
@ -108,6 +108,9 @@ void TextServerExtension::_bind_methods() {
|
||||
GDVIRTUAL_BIND(_font_set_force_autohinter, "font_rid", "force_autohinter");
|
||||
GDVIRTUAL_BIND(_font_is_force_autohinter, "font_rid");
|
||||
|
||||
GDVIRTUAL_BIND(_font_set_modulate_color_glyphs, "font_rid", "modulate");
|
||||
GDVIRTUAL_BIND(_font_is_modulate_color_glyphs, "font_rid");
|
||||
|
||||
GDVIRTUAL_BIND(_font_set_hinting, "font_rid", "hinting");
|
||||
GDVIRTUAL_BIND(_font_get_hinting, "font_rid");
|
||||
|
||||
@ -631,6 +634,16 @@ bool TextServerExtension::font_is_force_autohinter(const RID &p_font_rid) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void TextServerExtension::font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) {
|
||||
GDVIRTUAL_CALL(_font_set_modulate_color_glyphs, p_font_rid, p_modulate);
|
||||
}
|
||||
|
||||
bool TextServerExtension::font_is_modulate_color_glyphs(const RID &p_font_rid) const {
|
||||
bool ret = false;
|
||||
GDVIRTUAL_CALL(_font_is_modulate_color_glyphs, p_font_rid, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void TextServerExtension::font_set_hinting(const RID &p_font_rid, TextServer::Hinting p_hinting) {
|
||||
GDVIRTUAL_CALL(_font_set_hinting, p_font_rid, p_hinting);
|
||||
}
|
||||
|
||||
@ -204,6 +204,11 @@ public:
|
||||
GDVIRTUAL2(_font_set_force_autohinter, RID, bool);
|
||||
GDVIRTUAL1RC(bool, _font_is_force_autohinter, RID);
|
||||
|
||||
virtual void font_set_modulate_color_glyphs(const RID &p_font_rid, bool p_modulate) override;
|
||||
virtual bool font_is_modulate_color_glyphs(const RID &p_font_rid) const override;
|
||||
GDVIRTUAL2(_font_set_modulate_color_glyphs, RID, bool);
|
||||
GDVIRTUAL1RC(bool, _font_is_modulate_color_glyphs, RID);
|
||||
|
||||
virtual void font_set_hinting(const RID &p_font_rid, Hinting p_hinting) override;
|
||||
virtual Hinting font_get_hinting(const RID &p_font_rid) const override;
|
||||
GDVIRTUAL2(_font_set_hinting, RID, Hinting);
|
||||
|
||||
Reference in New Issue
Block a user