Restore per font oversampling override.

This commit is contained in:
Pāvels Nadtočajevs
2025-06-19 15:05:52 +03:00
parent 8de08c7c21
commit 22e99a4901
17 changed files with 130 additions and 43 deletions

View File

@@ -756,15 +756,15 @@ Dictionary TextServerExtension::font_get_variation_coordinates(const RID &p_font
return ret;
}
#ifndef DISABLE_DEPRECATED
void TextServerExtension::font_set_oversampling(const RID &p_font_rid, double p_oversampling) {
// NOP
GDVIRTUAL_CALL(_font_set_oversampling, p_font_rid, p_oversampling);
}
double TextServerExtension::font_get_oversampling(const RID &p_font_rid) const {
return 1.0;
double ret = -1.0;
GDVIRTUAL_CALL(_font_get_oversampling, p_font_rid, ret);
return ret;
}
#endif
TypedArray<Vector2i> TextServerExtension::font_get_size_cache_list(const RID &p_font_rid) const {
TypedArray<Vector2i> ret;

View File

@@ -221,12 +221,10 @@ public:
GDVIRTUAL2(_font_set_variation_coordinates, RID, Dictionary);
GDVIRTUAL1RC(Dictionary, _font_get_variation_coordinates, RID);
#ifndef DISABLE_DEPRECATED
virtual void font_set_oversampling(const RID &p_font_rid, double p_oversampling) override;
virtual double font_get_oversampling(const RID &p_font_rid) const override;
GDVIRTUAL2(_font_set_oversampling, RID, double);
GDVIRTUAL1RC(double, _font_get_oversampling, RID);
#endif
virtual TypedArray<Vector2i> font_get_size_cache_list(const RID &p_font_rid) const override;
virtual void font_clear_size_cache(const RID &p_font_rid) override;