Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TextServer / Font] Add support for customizable baseline offset. #87668

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/classes/Font.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<param index="5" name="spacing_bottom" type="int" default="0" />
<param index="6" name="spacing_space" type="int" default="0" />
<param index="7" name="spacing_glyph" type="int" default="0" />
<param index="8" name="baseline_offset" type="float" default="0.0" />
<description>
Returns [TextServer] RID of the font cache for specific variation.
</description>
Expand Down
15 changes: 15 additions & 0 deletions doc/classes/FontFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@
Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
<method name="get_extra_baseline_offset" qualifiers="const">
<return type="float" />
<param index="0" name="cache_index" type="int" />
<description>
Returns extra baseline offset (as a fraction of font height).
</description>
</method>
<method name="get_extra_spacing" qualifiers="const">
<return type="int" />
<param index="0" name="cache_index" type="int" />
Expand Down Expand Up @@ -445,6 +452,14 @@
Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness.
</description>
</method>
<method name="set_extra_baseline_offset">
<return type="void" />
<param index="0" name="cache_index" type="int" />
<param index="1" name="baseline_offset" type="float" />
<description>
Sets extra baseline offset (as a fraction of font height).
</description>
</method>
<method name="set_extra_spacing">
<return type="void" />
<param index="0" name="cache_index" type="int" />
Expand Down
3 changes: 3 additions & 0 deletions doc/classes/FontVariation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<member name="base_font" type="Font" setter="set_base_font" getter="get_base_font">
Base font used to create a variation. If not set, default [Theme] font is used.
</member>
<member name="baseline_offset" type="float" setter="set_baseline_offset" getter="get_baseline_offset" default="0.0">
Extra baseline offset (as a fraction of font height).
</member>
<member name="opentype_features" type="Dictionary" setter="set_opentype_features" getter="get_opentype_features" default="{}">
A set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
</member>
Expand Down
15 changes: 15 additions & 0 deletions doc/classes/TextServer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@
Returns the font ascent (number of pixels above the baseline).
</description>
</method>
<method name="font_get_baseline_offset" qualifiers="const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<description>
Returns extra baseline offset (as a fraction of font height).
</description>
</method>
<method name="font_get_char_from_glyph_index" qualifiers="const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
Expand Down Expand Up @@ -640,6 +647,14 @@
Sets the font ascent (number of pixels above the baseline).
</description>
</method>
<method name="font_set_baseline_offset">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="baseline_offset" type="float" />
<description>
Sets extra baseline offset (as a fraction of font height).
</description>
</method>
<method name="font_set_data">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
Expand Down
13 changes: 13 additions & 0 deletions doc/classes/TextServerExtension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@
<description>
</description>
</method>
<method name="_font_get_baseline_offset" qualifiers="virtual const">
<return type="float" />
<param index="0" name="font_rid" type="RID" />
<description>
</description>
</method>
<method name="_font_get_char_from_glyph_index" qualifiers="virtual const">
<return type="int" />
<param index="0" name="font_rid" type="RID" />
Expand Down Expand Up @@ -552,6 +558,13 @@
<description>
</description>
</method>
<method name="_font_set_baseline_offset" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
<param index="1" name="baseline_offset" type="float" />
<description>
</description>
</method>
<method name="_font_set_data" qualifiers="virtual">
<return type="void" />
<param index="0" name="font_rid" type="RID" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Added optional argument. Compatibility methods registered.

GH-80954
--------
Validate extension JSON: Error: Field 'classes/Font/methods/find_variation/arguments': size changed value in new API, from 4 to 8.
Validate extension JSON: Error: Field 'classes/Font/methods/find_variation/arguments': size changed value in new API, from 4 to 9.

Added optional arguments. Compatibility method registered.

Expand Down
7 changes: 7 additions & 0 deletions misc/extension_api_validation/4.2-stable.expected
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@ GH-86158
Validate extension JSON: Error: Field 'classes/GraphEdit/methods/get_connection_line': is_const changed value in new API, from false to true.

get_connection_line was made const.


GH-87668
--------
Validate extension JSON: Error: Field 'classes/Font/methods/find_variation/arguments': size changed value in new API, from 8 to 9.

Added optional "baseline_offset" argument. Compatibility method registered.
41 changes: 41 additions & 0 deletions modules/text_server_adv/text_server_adv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2409,6 +2409,37 @@ int64_t TextServerAdvanced::_font_get_spacing(const RID &p_font_rid, SpacingType
}
}

void TextServerAdvanced::_font_set_baseline_offset(const RID &p_font_rid, float p_baseline_offset) {
FontAdvancedLinkedVariation *fdv = font_var_owner.get_or_null(p_font_rid);
if (fdv) {
if (fdv->baseline_offset != p_baseline_offset) {
fdv->baseline_offset = p_baseline_offset;
}
} else {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_NULL(fd);

MutexLock lock(fd->mutex);
if (fd->baseline_offset != p_baseline_offset) {
_font_clear_cache(fd);
fd->baseline_offset = p_baseline_offset;
}
}
}

float TextServerAdvanced::_font_get_baseline_offset(const RID &p_font_rid) const {
FontAdvancedLinkedVariation *fdv = font_var_owner.get_or_null(p_font_rid);
if (fdv) {
return fdv->baseline_offset;
} else {
FontAdvanced *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_NULL_V(fd, 0.0);

MutexLock lock(fd->mutex);
return fd->baseline_offset;
}
}

void TextServerAdvanced::_font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
FontAdvanced *fd = _get_font_data(p_font_rid);
ERR_FAIL_NULL(fd);
Expand Down Expand Up @@ -5750,6 +5781,11 @@ Glyph TextServerAdvanced::_shape_single_glyph(ShapedTextDataAdvanced *p_sd, char
gl.x_off = Math::round((double)glyph_pos[0].x_offset / (64.0 / scale));
}
gl.y_off = -Math::round((double)glyph_pos[0].y_offset / (64.0 / scale));
if (p_sd->orientation == ORIENTATION_HORIZONTAL) {
gl.y_off += _font_get_baseline_offset(gl.font_rid) * (double)(_font_get_ascent(gl.font_rid, gl.font_size) + _font_get_descent(gl.font_rid, gl.font_size));
} else {
gl.x_off += _font_get_baseline_offset(gl.font_rid) * (double)(_font_get_ascent(gl.font_rid, gl.font_size) + _font_get_descent(gl.font_rid, gl.font_size));
}

if ((glyph_info[0].codepoint != 0) || !u_isgraph(p_char)) {
gl.flags |= GRAPHEME_IS_VALID;
Expand Down Expand Up @@ -5964,6 +6000,11 @@ void TextServerAdvanced::_shape_run(ShapedTextDataAdvanced *p_sd, int64_t p_star
gl.x_off = Math::round((double)glyph_pos[i].x_offset / (64.0 / scale));
}
gl.y_off = -Math::round((double)glyph_pos[i].y_offset / (64.0 / scale));
if (p_sd->orientation == ORIENTATION_HORIZONTAL) {
gl.y_off += _font_get_baseline_offset(gl.font_rid) * (double)(_font_get_ascent(gl.font_rid, gl.font_size) + _font_get_descent(gl.font_rid, gl.font_size));
} else {
gl.x_off += _font_get_baseline_offset(gl.font_rid) * (double)(_font_get_ascent(gl.font_rid, gl.font_size) + _font_get_descent(gl.font_rid, gl.font_size));
}
}
if (!last_run || i < glyph_count - 1) {
// Do not add extra spacing to the last glyph of the string.
Expand Down
11 changes: 9 additions & 2 deletions modules/text_server_adv/text_server_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ class TextServerAdvanced : public TextServerExtension {
struct FontAdvancedLinkedVariation {
RID base_font;
int extra_spacing[4] = { 0, 0, 0, 0 };
float baseline_offset = 0.0;
};

struct FontAdvanced {
Expand Down Expand Up @@ -324,6 +325,7 @@ class TextServerAdvanced : public TextServerExtension {
int weight = 400;
int stretch = 100;
int extra_spacing[4] = { 0, 0, 0, 0 };
float baseline_offset = 0.0;

HashMap<Vector2i, FontForSizeAdvanced *, VariantHasher, VariantComparator> cache;

Expand Down Expand Up @@ -574,9 +576,10 @@ class TextServerAdvanced : public TextServerExtension {
double embolden = 0.0;
Transform2D transform;
int extra_spacing[4] = { 0, 0, 0, 0 };
float baseline_offset = 0.0;

bool operator==(const SystemFontKey &p_b) const {
return (font_name == p_b.font_name) && (antialiasing == p_b.antialiasing) && (italic == p_b.italic) && (mipmaps == p_b.mipmaps) && (msdf == p_b.msdf) && (force_autohinter == p_b.force_autohinter) && (weight == p_b.weight) && (stretch == p_b.stretch) && (msdf_range == p_b.msdf_range) && (msdf_source_size == p_b.msdf_source_size) && (fixed_size == p_b.fixed_size) && (hinting == p_b.hinting) && (subpixel_positioning == p_b.subpixel_positioning) && (variation_coordinates == p_b.variation_coordinates) && (oversampling == p_b.oversampling) && (embolden == p_b.embolden) && (transform == p_b.transform) && (extra_spacing[SPACING_TOP] == p_b.extra_spacing[SPACING_TOP]) && (extra_spacing[SPACING_BOTTOM] == p_b.extra_spacing[SPACING_BOTTOM]) && (extra_spacing[SPACING_SPACE] == p_b.extra_spacing[SPACING_SPACE]) && (extra_spacing[SPACING_GLYPH] == p_b.extra_spacing[SPACING_GLYPH]);
return (font_name == p_b.font_name) && (antialiasing == p_b.antialiasing) && (italic == p_b.italic) && (mipmaps == p_b.mipmaps) && (msdf == p_b.msdf) && (force_autohinter == p_b.force_autohinter) && (weight == p_b.weight) && (stretch == p_b.stretch) && (msdf_range == p_b.msdf_range) && (msdf_source_size == p_b.msdf_source_size) && (fixed_size == p_b.fixed_size) && (hinting == p_b.hinting) && (subpixel_positioning == p_b.subpixel_positioning) && (variation_coordinates == p_b.variation_coordinates) && (oversampling == p_b.oversampling) && (embolden == p_b.embolden) && (transform == p_b.transform) && (extra_spacing[SPACING_TOP] == p_b.extra_spacing[SPACING_TOP]) && (extra_spacing[SPACING_BOTTOM] == p_b.extra_spacing[SPACING_BOTTOM]) && (extra_spacing[SPACING_SPACE] == p_b.extra_spacing[SPACING_SPACE]) && (extra_spacing[SPACING_GLYPH] == p_b.extra_spacing[SPACING_GLYPH]) && (baseline_offset == p_b.baseline_offset);
}

SystemFontKey(const String &p_font_name, bool p_italic, int p_weight, int p_stretch, RID p_font, const TextServerAdvanced *p_fb) {
Expand All @@ -601,6 +604,7 @@ class TextServerAdvanced : public TextServerExtension {
extra_spacing[SPACING_BOTTOM] = p_fb->_font_get_spacing(p_font, SPACING_BOTTOM);
extra_spacing[SPACING_SPACE] = p_fb->_font_get_spacing(p_font, SPACING_SPACE);
extra_spacing[SPACING_GLYPH] = p_fb->_font_get_spacing(p_font, SPACING_GLYPH);
baseline_offset = p_fb->_font_get_baseline_offset(p_font);
}
};

Expand Down Expand Up @@ -633,7 +637,7 @@ class TextServerAdvanced : public TextServerExtension {
hash = hash_murmur3_one_32(p_a.extra_spacing[SPACING_BOTTOM], hash);
hash = hash_murmur3_one_32(p_a.extra_spacing[SPACING_SPACE], hash);
hash = hash_murmur3_one_32(p_a.extra_spacing[SPACING_GLYPH], hash);

hash = hash_murmur3_one_double(p_a.baseline_offset, hash);
return hash_fmix32(hash_murmur3_one_32(((int)p_a.mipmaps) | ((int)p_a.msdf << 1) | ((int)p_a.italic << 2) | ((int)p_a.force_autohinter << 3) | ((int)p_a.hinting << 4) | ((int)p_a.subpixel_positioning << 8) | ((int)p_a.antialiasing << 12), hash));
}
};
Expand Down Expand Up @@ -781,6 +785,9 @@ class TextServerAdvanced : public TextServerExtension {
MODBIND3(font_set_spacing, const RID &, SpacingType, int64_t);
MODBIND2RC(int64_t, font_get_spacing, const RID &, SpacingType);

MODBIND2(font_set_baseline_offset, const RID &, float);
MODBIND1RC(float, font_get_baseline_offset, const RID &);

MODBIND2(font_set_transform, const RID &, const Transform2D &);
MODBIND1RC(Transform2D, font_get_transform, const RID &);

Expand Down
35 changes: 33 additions & 2 deletions modules/text_server_fb/text_server_fb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,37 @@ int64_t TextServerFallback::_font_get_spacing(const RID &p_font_rid, SpacingType
}
}

void TextServerFallback::_font_set_baseline_offset(const RID &p_font_rid, float p_baseline_offset) {
FontFallbackLinkedVariation *fdv = font_var_owner.get_or_null(p_font_rid);
if (fdv) {
if (fdv->baseline_offset != p_baseline_offset) {
fdv->baseline_offset = p_baseline_offset;
}
} else {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_NULL(fd);

MutexLock lock(fd->mutex);
if (fd->baseline_offset != p_baseline_offset) {
_font_clear_cache(fd);
fd->baseline_offset = p_baseline_offset;
}
}
}

float TextServerFallback::_font_get_baseline_offset(const RID &p_font_rid) const {
FontFallbackLinkedVariation *fdv = font_var_owner.get_or_null(p_font_rid);
if (fdv) {
return fdv->baseline_offset;
} else {
FontFallback *fd = font_owner.get_or_null(p_font_rid);
ERR_FAIL_NULL_V(fd, 0.0);

MutexLock lock(fd->mutex);
return fd->baseline_offset;
}
}

void TextServerFallback::_font_set_transform(const RID &p_font_rid, const Transform2D &p_transform) {
FontFallback *fd = _get_font_data(p_font_rid);
ERR_FAIL_NULL(fd);
Expand Down Expand Up @@ -4105,12 +4136,12 @@ bool TextServerFallback::_shaped_text_shape(const RID &p_shaped) {
if (sd->orientation == ORIENTATION_HORIZONTAL) {
gl.advance = _font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x;
gl.x_off = 0;
gl.y_off = 0;
gl.y_off = _font_get_baseline_offset(gl.font_rid) * (double)(_font_get_ascent(gl.font_rid, gl.font_size) + _font_get_descent(gl.font_rid, gl.font_size));
sd->ascent = MAX(sd->ascent, _font_get_ascent(gl.font_rid, gl.font_size) + _font_get_spacing(gl.font_rid, SPACING_TOP));
sd->descent = MAX(sd->descent, _font_get_descent(gl.font_rid, gl.font_size) + _font_get_spacing(gl.font_rid, SPACING_BOTTOM));
} else {
gl.advance = _font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).y;
gl.x_off = -Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5);
gl.x_off = -Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5) + _font_get_baseline_offset(gl.font_rid) * (double)(_font_get_ascent(gl.font_rid, gl.font_size) + _font_get_descent(gl.font_rid, gl.font_size));
gl.y_off = _font_get_ascent(gl.font_rid, gl.font_size);
sd->ascent = MAX(sd->ascent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
sd->descent = MAX(sd->descent, Math::round(_font_get_glyph_advance(gl.font_rid, gl.font_size, gl.index).x * 0.5));
Expand Down
10 changes: 9 additions & 1 deletion modules/text_server_fb/text_server_fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ class TextServerFallback : public TextServerExtension {
struct FontFallbackLinkedVariation {
RID base_font;
int extra_spacing[4] = { 0, 0, 0, 0 };
float baseline_offset = 0.0;
};

struct FontFallback {
Expand Down Expand Up @@ -275,6 +276,7 @@ class TextServerFallback : public TextServerExtension {
int weight = 400;
int stretch = 100;
int extra_spacing[4] = { 0, 0, 0, 0 };
float baseline_offset = 0.0;

HashMap<Vector2i, FontForSizeFallback *, VariantHasher, VariantComparator> cache;

Expand Down Expand Up @@ -490,9 +492,10 @@ class TextServerFallback : public TextServerExtension {
double embolden = 0.0;
Transform2D transform;
int extra_spacing[4] = { 0, 0, 0, 0 };
float baseline_offset = 0.0;

bool operator==(const SystemFontKey &p_b) const {
return (font_name == p_b.font_name) && (antialiasing == p_b.antialiasing) && (italic == p_b.italic) && (mipmaps == p_b.mipmaps) && (msdf == p_b.msdf) && (force_autohinter == p_b.force_autohinter) && (weight == p_b.weight) && (stretch == p_b.stretch) && (msdf_range == p_b.msdf_range) && (msdf_source_size == p_b.msdf_source_size) && (fixed_size == p_b.fixed_size) && (hinting == p_b.hinting) && (subpixel_positioning == p_b.subpixel_positioning) && (variation_coordinates == p_b.variation_coordinates) && (oversampling == p_b.oversampling) && (embolden == p_b.embolden) && (transform == p_b.transform) && (extra_spacing[SPACING_TOP] == p_b.extra_spacing[SPACING_TOP]) && (extra_spacing[SPACING_BOTTOM] == p_b.extra_spacing[SPACING_BOTTOM]) && (extra_spacing[SPACING_SPACE] == p_b.extra_spacing[SPACING_SPACE]) && (extra_spacing[SPACING_GLYPH] == p_b.extra_spacing[SPACING_GLYPH]);
return (font_name == p_b.font_name) && (antialiasing == p_b.antialiasing) && (italic == p_b.italic) && (mipmaps == p_b.mipmaps) && (msdf == p_b.msdf) && (force_autohinter == p_b.force_autohinter) && (weight == p_b.weight) && (stretch == p_b.stretch) && (msdf_range == p_b.msdf_range) && (msdf_source_size == p_b.msdf_source_size) && (fixed_size == p_b.fixed_size) && (hinting == p_b.hinting) && (subpixel_positioning == p_b.subpixel_positioning) && (variation_coordinates == p_b.variation_coordinates) && (oversampling == p_b.oversampling) && (embolden == p_b.embolden) && (transform == p_b.transform) && (extra_spacing[SPACING_TOP] == p_b.extra_spacing[SPACING_TOP]) && (extra_spacing[SPACING_BOTTOM] == p_b.extra_spacing[SPACING_BOTTOM]) && (extra_spacing[SPACING_SPACE] == p_b.extra_spacing[SPACING_SPACE]) && (extra_spacing[SPACING_GLYPH] == p_b.extra_spacing[SPACING_GLYPH]) && (baseline_offset == p_b.baseline_offset);
}

SystemFontKey(const String &p_font_name, bool p_italic, int p_weight, int p_stretch, RID p_font, const TextServerFallback *p_fb) {
Expand All @@ -517,6 +520,7 @@ class TextServerFallback : public TextServerExtension {
extra_spacing[SPACING_BOTTOM] = p_fb->_font_get_spacing(p_font, SPACING_BOTTOM);
extra_spacing[SPACING_SPACE] = p_fb->_font_get_spacing(p_font, SPACING_SPACE);
extra_spacing[SPACING_GLYPH] = p_fb->_font_get_spacing(p_font, SPACING_GLYPH);
baseline_offset = p_fb->_font_get_baseline_offset(p_font);
}
};

Expand Down Expand Up @@ -549,6 +553,7 @@ class TextServerFallback : public TextServerExtension {
hash = hash_murmur3_one_32(p_a.extra_spacing[SPACING_BOTTOM], hash);
hash = hash_murmur3_one_32(p_a.extra_spacing[SPACING_SPACE], hash);
hash = hash_murmur3_one_32(p_a.extra_spacing[SPACING_GLYPH], hash);
hash = hash_murmur3_one_double(p_a.baseline_offset, hash);
return hash_fmix32(hash_murmur3_one_32(((int)p_a.mipmaps) | ((int)p_a.msdf << 1) | ((int)p_a.italic << 2) | ((int)p_a.force_autohinter << 3) | ((int)p_a.hinting << 4) | ((int)p_a.subpixel_positioning << 8) | ((int)p_a.antialiasing << 12), hash));
}
};
Expand Down Expand Up @@ -648,6 +653,9 @@ class TextServerFallback : public TextServerExtension {
MODBIND3(font_set_spacing, const RID &, SpacingType, int64_t);
MODBIND2RC(int64_t, font_get_spacing, const RID &, SpacingType);

MODBIND2(font_set_baseline_offset, const RID &, float);
MODBIND1RC(float, font_get_baseline_offset, const RID &);

MODBIND2(font_set_transform, const RID &, const Transform2D &);
MODBIND1RC(Transform2D, font_get_transform, const RID &);

Expand Down
7 changes: 6 additions & 1 deletion scene/resources/font.compat.inc
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@
#ifndef DISABLE_DEPRECATED

RID Font::_find_variation_compat_80954(const Dictionary &p_variation_coordinates, int p_face_index, float p_strength, Transform2D p_transform) const {
return find_variation(p_variation_coordinates, p_face_index, p_strength, p_transform, 0, 0, 0, 0);
return find_variation(p_variation_coordinates, p_face_index, p_strength, p_transform, 0, 0, 0, 0, 0.0);
}

RID Font::_find_variation_compat_87668(const Dictionary &p_variation_coordinates, int p_face_index, float p_strength, Transform2D p_transform, int p_spacing_top, int p_spacing_bottom, int p_spacing_space, int p_spacing_glyph) const {
return find_variation(p_variation_coordinates, p_face_index, p_strength, p_transform, p_spacing_top, p_spacing_bottom, p_spacing_space, p_spacing_glyph, 0.0);
}

void Font::_bind_compatibility_methods() {
ClassDB::bind_compatibility_method(D_METHOD("find_variation", "variation_coordinates", "face_index", "strength", "transform"), &Font::_find_variation_compat_80954, DEFVAL(0), DEFVAL(0.0), DEFVAL(Transform2D()));
ClassDB::bind_compatibility_method(D_METHOD("find_variation", "variation_coordinates", "face_index", "strength", "transform", "spacing_top", "spacing_bottom", "spacing_space", "spacing_glyph"), &Font::_find_variation_compat_87668, DEFVAL(0), DEFVAL(0.0), DEFVAL(Transform2D()), DEFVAL(0), DEFVAL(0), DEFVAL(0), DEFVAL(0));
}

#endif
Loading
Loading