mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
[Text Server] Store extra spacing of individual font variations.
This commit is contained in:
@@ -336,9 +336,6 @@ void EditorSpinSlider::_draw_spin_slider() {
|
||||
int suffix_start = numstr.length();
|
||||
RID num_rid = TS->create_shaped_text();
|
||||
TS->shaped_text_add_string(num_rid, numstr + U"\u2009" + suffix, font->get_rids(), font_size, font->get_opentype_features());
|
||||
for (int i = 0; i < TextServer::SPACING_MAX; i++) {
|
||||
TS->shaped_text_set_spacing(num_rid, TextServer::SpacingType(i), font->get_spacing(TextServer::SpacingType(i)));
|
||||
}
|
||||
|
||||
float text_start = rtl ? Math::round(sb->get_offset().x) : Math::round(sb->get_offset().x + label_width + sep);
|
||||
Vector2 text_ofs = rtl ? Vector2(text_start + (number_width - TS->shaped_text_get_width(num_rid)), vofs) : Vector2(text_start, vofs);
|
||||
|
||||
Reference in New Issue
Block a user