mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Refactor Font configuration and import UI, and Font resources.
This commit is contained in:
@@ -127,9 +127,6 @@ void TextServerExtension::_bind_methods() {
|
||||
GDVIRTUAL_BIND(font_set_scale, "font_rid", "size", "scale");
|
||||
GDVIRTUAL_BIND(font_get_scale, "font_rid", "size");
|
||||
|
||||
GDVIRTUAL_BIND(font_set_spacing, "font_rid", "size", "spacing", "value");
|
||||
GDVIRTUAL_BIND(font_get_spacing, "font_rid", "size", "spacing");
|
||||
|
||||
GDVIRTUAL_BIND(font_get_texture_count, "font_rid", "size");
|
||||
GDVIRTUAL_BIND(font_clear_textures, "font_rid", "size");
|
||||
GDVIRTUAL_BIND(font_remove_texture, "font_rid", "size", "texture_index");
|
||||
@@ -230,6 +227,9 @@ void TextServerExtension::_bind_methods() {
|
||||
GDVIRTUAL_BIND(shaped_text_set_preserve_control, "shaped", "enabled");
|
||||
GDVIRTUAL_BIND(shaped_text_get_preserve_control, "shaped");
|
||||
|
||||
GDVIRTUAL_BIND(shaped_text_set_spacing, "shaped", "spacing", "value");
|
||||
GDVIRTUAL_BIND(shaped_text_get_spacing, "shaped", "spacing");
|
||||
|
||||
GDVIRTUAL_BIND(shaped_text_add_string, "shaped", "text", "fonts", "size", "opentype_features", "language", "meta");
|
||||
GDVIRTUAL_BIND(shaped_text_add_object, "shaped", "key", "size", "inline_align", "length");
|
||||
GDVIRTUAL_BIND(shaped_text_resize_object, "shaped", "key", "size", "inline_align");
|
||||
@@ -706,18 +706,6 @@ double TextServerExtension::font_get_scale(const RID &p_font_rid, int64_t p_size
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
void TextServerExtension::font_set_spacing(const RID &p_font_rid, int64_t p_size, TextServer::SpacingType p_spacing, int64_t p_value) {
|
||||
GDVIRTUAL_CALL(font_set_spacing, p_font_rid, p_size, p_spacing, p_value);
|
||||
}
|
||||
|
||||
int64_t TextServerExtension::font_get_spacing(const RID &p_font_rid, int64_t p_size, TextServer::SpacingType p_spacing) const {
|
||||
int64_t ret;
|
||||
if (GDVIRTUAL_CALL(font_get_spacing, p_font_rid, p_size, p_spacing, ret)) {
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t TextServerExtension::font_get_texture_count(const RID &p_font_rid, const Vector2i &p_size) const {
|
||||
int64_t ret;
|
||||
if (GDVIRTUAL_CALL(font_get_texture_count, p_font_rid, p_size, ret)) {
|
||||
@@ -1132,6 +1120,18 @@ bool TextServerExtension::shaped_text_get_preserve_control(const RID &p_shaped)
|
||||
return false;
|
||||
}
|
||||
|
||||
void TextServerExtension::shaped_text_set_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing, int64_t p_value) {
|
||||
GDVIRTUAL_CALL(shaped_text_set_spacing, p_shaped, p_spacing, p_value);
|
||||
}
|
||||
|
||||
int64_t TextServerExtension::shaped_text_get_spacing(const RID &p_shaped, TextServer::SpacingType p_spacing) const {
|
||||
int64_t ret;
|
||||
if (GDVIRTUAL_CALL(shaped_text_get_spacing, p_shaped, p_spacing, ret)) {
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool TextServerExtension::shaped_text_add_string(const RID &p_shaped, const String &p_text, const Array &p_fonts, int64_t p_size, const Dictionary &p_opentype_features, const String &p_language, const Variant &p_meta) {
|
||||
bool ret;
|
||||
if (GDVIRTUAL_CALL(shaped_text_add_string, p_shaped, p_text, p_fonts, p_size, p_opentype_features, p_language, p_meta, ret)) {
|
||||
|
||||
Reference in New Issue
Block a user