diff options
| author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2024-02-22 12:10:37 +0200 |
|---|---|---|
| committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2024-03-13 12:57:39 +0200 |
| commit | 3bb5047db3add0e7fcf11bc8a3fc36a8e9df6d5d (patch) | |
| tree | 782a2b7ca300c06a24c04b53486f5c5f17398551 /modules/text_server_fb | |
| parent | 61282068f4d59cb48f35ad95391728c58d9008ab (diff) | |
| download | redot-engine-3bb5047db3add0e7fcf11bc8a3fc36a8e9df6d5d.tar.gz | |
[TextServer] Use GDVIRTUAL_REQUIRED_CALL for required extensions methods, update extension docs.
Diffstat (limited to 'modules/text_server_fb')
| -rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index 1a63e5ac42..edf34d4550 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -73,8 +73,6 @@ using namespace godot; /*************************************************************************/ -#define OT_TAG(c1, c2, c3, c4) ((int32_t)((((uint32_t)(c1) & 0xff) << 24) | (((uint32_t)(c2) & 0xff) << 16) | (((uint32_t)(c3) & 0xff) << 8) | ((uint32_t)(c4) & 0xff))) - bool TextServerFallback::_has_feature(Feature p_feature) const { switch (p_feature) { case FEATURE_SIMPLE_LAYOUT: @@ -907,8 +905,8 @@ _FORCE_INLINE_ bool TextServerFallback::_ensure_cache_for_size(FontFallback *p_f coords.write[i] = CLAMP(var_value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum); } - if (p_font_data->variation_coordinates.has(_tag_to_name(var_tag))) { - var_value = p_font_data->variation_coordinates[_tag_to_name(var_tag)]; + if (p_font_data->variation_coordinates.has(tag_to_name(var_tag))) { + var_value = p_font_data->variation_coordinates[tag_to_name(var_tag)]; coords.write[i] = CLAMP(var_value * 65536.0, amaster->axis[i].minimum, amaster->axis[i].maximum); } } @@ -3704,9 +3702,9 @@ RID TextServerFallback::_find_sys_font_for_text(const RID &p_fdef, const String int font_weight = _font_get_weight(p_fdef); int font_stretch = _font_get_stretch(p_fdef); Dictionary dvar = _font_get_variation_coordinates(p_fdef); - static int64_t wgth_tag = _name_to_tag("weight"); - static int64_t wdth_tag = _name_to_tag("width"); - static int64_t ital_tag = _name_to_tag("italic"); + static int64_t wgth_tag = name_to_tag("weight"); + static int64_t wdth_tag = name_to_tag("width"); + static int64_t ital_tag = name_to_tag("italic"); if (dvar.has(wgth_tag)) { font_weight = dvar[wgth_tag].operator int(); } |
