feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -32,7 +32,9 @@
|
|||
#include "text_server.compat.inc"
|
||||
|
||||
#include "core/config/project_settings.h"
|
||||
#include "core/object/class_db.h"
|
||||
#include "core/os/main_loop.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/variant/typed_array.h"
|
||||
#include "servers/rendering/rendering_server.h"
|
||||
|
||||
|
|
@ -68,7 +70,7 @@ void TextServerManager::add_interface(const Ref<TextServer> &p_interface) {
|
|||
};
|
||||
|
||||
interfaces.push_back(p_interface);
|
||||
print_verbose("TextServer: Added interface \"" + p_interface->get_name() + "\"");
|
||||
print_verbose("TextServer: Added interface \"" + p_interface->get_name() + "\" (" + p_interface->get_short_name() + ")");
|
||||
emit_signal(SNAME("interface_added"), p_interface->get_name());
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +87,7 @@ void TextServerManager::remove_interface(const Ref<TextServer> &p_interface) {
|
|||
};
|
||||
|
||||
ERR_FAIL_COND_MSG(idx == -1, "Interface not found.");
|
||||
print_verbose("TextServer: Removed interface \"" + p_interface->get_name() + "\"");
|
||||
print_verbose("TextServer: Removed interface \"" + p_interface->get_name() + "\" (" + p_interface->get_short_name() + ")");
|
||||
emit_signal(SNAME("interface_removed"), p_interface->get_name());
|
||||
interfaces.remove_at(idx);
|
||||
}
|
||||
|
|
@ -120,6 +122,7 @@ TypedArray<Dictionary> TextServerManager::get_interfaces() const {
|
|||
|
||||
iface_info["id"] = i;
|
||||
iface_info["name"] = interfaces[i]->get_name();
|
||||
iface_info["short_name"] = interfaces[i]->get_short_name();
|
||||
|
||||
ret.push_back(iface_info);
|
||||
};
|
||||
|
|
@ -133,7 +136,7 @@ void TextServerManager::set_primary_interface(const Ref<TextServer> &p_primary_i
|
|||
primary_interface.unref();
|
||||
} else {
|
||||
primary_interface = p_primary_interface;
|
||||
print_verbose("TextServer: Primary interface set to: \"" + primary_interface->get_name() + "\".");
|
||||
print_verbose("TextServer: Primary interface set to: \"" + primary_interface->get_name() + "\" (" + primary_interface->get_short_name() + ").");
|
||||
|
||||
if (OS::get_singleton()->get_main_loop()) {
|
||||
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TEXT_SERVER_CHANGED);
|
||||
|
|
@ -198,6 +201,7 @@ double TextServer::vp_oversampling = 0.0;
|
|||
void TextServer::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("has_feature", "feature"), &TextServer::has_feature);
|
||||
ClassDB::bind_method(D_METHOD("get_name"), &TextServer::get_name);
|
||||
ClassDB::bind_method(D_METHOD("get_short_name"), &TextServer::get_short_name);
|
||||
ClassDB::bind_method(D_METHOD("get_features"), &TextServer::get_features);
|
||||
ClassDB::bind_method(D_METHOD("load_support_data", "filename"), &TextServer::load_support_data);
|
||||
|
||||
|
|
@ -274,9 +278,17 @@ void TextServer::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("font_set_force_autohinter", "font_rid", "force_autohinter"), &TextServer::font_set_force_autohinter);
|
||||
ClassDB::bind_method(D_METHOD("font_is_force_autohinter", "font_rid"), &TextServer::font_is_force_autohinter);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("font_set_modulate_color_glyphs", "font_rid", "force_autohinter"), &TextServer::font_set_modulate_color_glyphs);
|
||||
ClassDB::bind_method(D_METHOD("font_set_modulate_color_glyphs", "font_rid", "modulate"), &TextServer::font_set_modulate_color_glyphs);
|
||||
ClassDB::bind_method(D_METHOD("font_is_modulate_color_glyphs", "font_rid"), &TextServer::font_is_modulate_color_glyphs);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("font_get_palette_count", "font_rid"), &TextServer::font_get_palette_count);
|
||||
ClassDB::bind_method(D_METHOD("font_get_palette_name", "font_rid", "index"), &TextServer::font_get_palette_name);
|
||||
ClassDB::bind_method(D_METHOD("font_get_palette_colors", "font_rid", "index"), &TextServer::font_get_palette_colors);
|
||||
ClassDB::bind_method(D_METHOD("font_set_palette_custom_colors", "font_rid", "colors"), &TextServer::font_set_palette_custom_colors);
|
||||
ClassDB::bind_method(D_METHOD("font_get_palette_custom_colors", "font_rid"), &TextServer::font_get_palette_custom_colors);
|
||||
ClassDB::bind_method(D_METHOD("font_get_used_palette", "font_rid"), &TextServer::font_get_used_palette);
|
||||
ClassDB::bind_method(D_METHOD("font_set_used_palette", "font_rid", "index"), &TextServer::font_set_used_palette);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("font_set_hinting", "font_rid", "hinting"), &TextServer::font_set_hinting);
|
||||
ClassDB::bind_method(D_METHOD("font_get_hinting", "font_rid"), &TextServer::font_get_hinting);
|
||||
|
||||
|
|
@ -1242,8 +1254,6 @@ PackedInt32Array TextServer::shaped_text_get_word_breaks(const RID &p_shaped, Bi
|
|||
}
|
||||
|
||||
CaretInfo TextServer::shaped_text_get_carets(const RID &p_shaped, int64_t p_position) const {
|
||||
Vector<Rect2> carets;
|
||||
|
||||
TextServer::Orientation orientation = shaped_text_get_orientation(p_shaped);
|
||||
const Vector2 &range = shaped_text_get_range(p_shaped);
|
||||
real_t ascent = shaped_text_get_ascent(p_shaped);
|
||||
|
|
@ -2311,6 +2321,7 @@ TypedArray<Dictionary> TextServer::_shaped_text_get_glyphs_wrapper(const RID &p_
|
|||
glyph["font_rid"] = glyphs[i].font_rid;
|
||||
glyph["font_size"] = glyphs[i].font_size;
|
||||
glyph["index"] = glyphs[i].index;
|
||||
glyph["span_index"] = glyphs[i].span_index;
|
||||
|
||||
ret.push_back(glyph);
|
||||
}
|
||||
|
|
@ -2336,6 +2347,7 @@ TypedArray<Dictionary> TextServer::_shaped_text_sort_logical_wrapper(const RID &
|
|||
glyph["font_rid"] = glyphs[i].font_rid;
|
||||
glyph["font_size"] = glyphs[i].font_size;
|
||||
glyph["index"] = glyphs[i].index;
|
||||
glyph["span_index"] = glyphs[i].span_index;
|
||||
|
||||
ret.push_back(glyph);
|
||||
}
|
||||
|
|
@ -2361,6 +2373,7 @@ TypedArray<Dictionary> TextServer::_shaped_text_get_ellipsis_glyphs_wrapper(cons
|
|||
glyph["font_rid"] = glyphs[i].font_rid;
|
||||
glyph["font_size"] = glyphs[i].font_size;
|
||||
glyph["index"] = glyphs[i].index;
|
||||
glyph["span_index"] = glyphs[i].span_index;
|
||||
|
||||
ret.push_back(glyph);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue