diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index ccc852c07..66dd5a25e 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -55,7 +55,7 @@ #include "scene/gui/range.h" #include "core/input/shortcut.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" float AnimationBezierTrackEdit::_bezier_h_to_pixel(float p_h) { float h = p_h; diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index ce56281ca..35dede947 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -87,7 +87,7 @@ #include "scene/main/node.h" #include "scene/main/scene_tree.h" #include "scene/main/viewport.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "servers/audio/audio_stream.h" diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index d688a705b..9e0b174c4 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -51,7 +51,7 @@ #include "core/object/undo_redo.h" #include "core/containers/vector.h" #include "scene/animation/animation.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "servers/rendering_server.h" /// BOOL /// diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp index 435751052..2c6381d29 100644 --- a/editor/editor_about.cpp +++ b/editor/editor_about.cpp @@ -55,7 +55,7 @@ #include "scene/gui/texture_rect.h" #include "scene/gui/tree.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" // The metadata key used to store and retrieve the version text to copy to the clipboard. diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 4e1fcebb1..75ece2689 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -66,7 +66,7 @@ #include "scene/gui/tree.h" #include "scene/main/node.h" #include "scene/main/timer.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "servers/audio/audio_effect.h" #include "servers/audio_server.h" diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp index 156b981c9..a4ed869eb 100644 --- a/editor/editor_fonts.cpp +++ b/editor/editor_fonts.cpp @@ -38,8 +38,8 @@ #include "core/variant/variant.h" #include "editor_scale.h" #include "editor_settings.h" -#include "scene/resources/dynamic_font.h" -#include "scene/resources/font.h" +#include "scene/resources/font/dynamic_font.h" +#include "scene/resources/font/font.h" #include "scene/resources/theme.h" #define MAKE_FALLBACKS(m_name) \ diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 0398b0084..ff3ec9a67 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -59,7 +59,7 @@ #include "scene/gui/texture_button.h" #include "scene/gui/tool_button.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp index 879af1dfb..877501986 100644 --- a/editor/editor_inspector.cpp +++ b/editor/editor_inspector.cpp @@ -63,7 +63,7 @@ #include "scene/main/node.h" #include "scene/main/scene_tree.h" #include "scene/property_utils.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/packed_scene.h" #include "scene/resources/style_box.h" #include "servers/rendering_server.h" diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index f3cb29a64..cbf3ff2b0 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -50,7 +50,7 @@ #include "scene/gui/separator.h" #include "scene/gui/tool_button.h" #include "scene/main/node.h" -#include "scene/resources/dynamic_font.h" +#include "scene/resources/font/dynamic_font.h" #include "scene/resources/texture.h" void EditorLog::LogFilter::initialize_button(const String &p_tooltip, Object *p_cb_obj, const StringName &p_method) { diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index d0dcdde73..186b3972a 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -84,7 +84,7 @@ #include "scene/main/node.h" #include "scene/main/scene_tree.h" #include "scene/main/viewport.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" ///////////////////// NULL ///////////////////////// diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index b49371e1f..9c4404ea6 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -53,7 +53,7 @@ #include "scene/gui/popup_menu.h" #include "scene/gui/texture_rect.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index cf4ea7394..89a1ccc7c 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -52,7 +52,7 @@ #include "editor_scale.h" #include "editor_settings.h" #include "modules/modules_enabled.gen.h" // For svg. -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" #ifdef MODULE_SVG_ENABLED diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 331822f5a..639b28b48 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -59,7 +59,7 @@ #include "core/object/reference.h" #include "core/typedefs.h" #include "scene/2d/canvas_item.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" const char *FindInFiles::SIGNAL_RESULT_FOUND = "result_found"; const char *FindInFiles::SIGNAL_FINISHED = "finished"; diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp index e87d984cd..602ecfab6 100644 --- a/editor/plugins/abstract_polygon_2d_editor.cpp +++ b/editor/plugins/abstract_polygon_2d_editor.cpp @@ -55,7 +55,7 @@ #include "scene/gui/tool_button.h" #include "scene/main/node.h" #include "scene/main/scene_tree.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" AbstractPolygon2DEditor::Vertex::Vertex() : diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp index 0166d813c..b56488cf8 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -62,7 +62,7 @@ #include "scene/gui/spin_box.h" #include "scene/gui/tool_button.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" #include "scene/animation/animation_blend_space_1d.h" diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp index c3cf24ab6..c5490cfc0 100644 --- a/editor/plugins/animation_blend_space_2d_editor.cpp +++ b/editor/plugins/animation_blend_space_2d_editor.cpp @@ -67,7 +67,7 @@ #include "scene/gui/spin_box.h" #include "scene/gui/tool_button.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" bool AnimationNodeBlendSpace2DEditor::can_edit(const Ref &p_node) { diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 42a32717a..4e293afee 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -62,7 +62,7 @@ #include "scene/gui/separator.h" #include "scene/gui/tool_button.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index af2fa7a02..d0ab387fc 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -94,8 +94,8 @@ #include "scene/main/scene_tree.h" #include "scene/main/timer.h" #include "scene/main/viewport.h" -#include "scene/resources/dynamic_font.h" -#include "scene/resources/font.h" +#include "scene/resources/font/dynamic_font.h" +#include "scene/resources/font/font.h" #include "scene/resources/packed_scene.h" #include "scene/resources/theme.h" #include "servers/rendering_server.h" diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 5379b0d8f..abf9a0477 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -52,7 +52,7 @@ #include "editor/editor_settings.h" #include "scene/2d/canvas_item.h" #include "scene/gui/popup_menu.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" CurveEditor::CurveEditor() { diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 7c1677dfd..aa363282b 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -35,7 +35,7 @@ #include "editor/editor_settings.h" #include "editor/editor_scale.h" #include "scene/resources/bit_map.h" -#include "scene/resources/dynamic_font.h" +#include "scene/resources/font/dynamic_font.h" #include "scene/resources/material.h" #include "scene/resources/mesh.h" #include "servers/audio/audio_stream.h" @@ -62,7 +62,7 @@ #include "core/containers/rb_set.h" #include "core/typedefs.h" #include "core/containers/vector.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/shader.h" #include "scene/resources/texture.h" #include "servers/audio_server.h" diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index a2bfee215..2ad39af22 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -89,7 +89,7 @@ #include "scene/main/scene_tree.h" #include "scene/main/viewport.h" #include "scene/resources/environment_3d.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/gradient.h" #include "scene/resources/packed_scene.h" #include "scene/resources/shader.h" diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index 5691daebd..0c40860f6 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -31,7 +31,7 @@ #include "texture_editor_plugin.h" #include "editor/editor_scale.h" -#include "scene/resources/dynamic_font.h" +#include "scene/resources/font/dynamic_font.h" #include "core/object/class_db.h" #include "core/math/color.h" #include "core/io/image.h" @@ -41,7 +41,7 @@ #include "scene/gui/label.h" #include "scene/gui/texture_rect.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" class EditorNode; diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index 3b4982a80..52a9a702e 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -69,7 +69,7 @@ #include "scene/main/node.h" #include "scene/main/scene_tree.h" #include "scene/main/timer.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" void ThemeItemImportTree::_update_items_tree() { diff --git a/editor/plugins/theme_editor_preview.h b/editor/plugins/theme_editor_preview.h index aed419acc..bd3f084d5 100644 --- a/editor/plugins/theme_editor_preview.h +++ b/editor/plugins/theme_editor_preview.h @@ -38,7 +38,7 @@ #include "core/string/ustring.h" #include "scene/resources/theme.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/packed_scene.h" #include "scene/resources/style_box.h" diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 2a5a75116..98e899d2f 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -94,7 +94,7 @@ #include "scene/main/node.h" #include "scene/main/scene_tree.h" #include "scene/main/viewport.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" #include "servers/rendering_server.h" diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 816804aca..564cf1be3 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -88,7 +88,7 @@ #include "scene/gui/tool_button.h" #include "scene/gui/tree.h" #include "scene/main/node.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/packed_scene.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" diff --git a/editor_modules/editor_code_editor/editor_code_text_editor.cpp b/editor_modules/editor_code_editor/editor_code_text_editor.cpp index 5e94dc45f..ade8338a3 100644 --- a/editor_modules/editor_code_editor/editor_code_text_editor.cpp +++ b/editor_modules/editor_code_editor/editor_code_text_editor.cpp @@ -60,8 +60,8 @@ #include "scene/gui/tool_button.h" #include "scene/main/node.h" #include "scene/main/timer.h" -#include "scene/resources/dynamic_font.h" -#include "scene/resources/font.h" +#include "scene/resources/font/dynamic_font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" #include "editor_find_replace_bar.h" diff --git a/editor_modules/editor_code_editor/editor_find_replace_bar.cpp b/editor_modules/editor_code_editor/editor_find_replace_bar.cpp index 4caba30e2..4e8a4f901 100644 --- a/editor_modules/editor_code_editor/editor_find_replace_bar.cpp +++ b/editor_modules/editor_code_editor/editor_find_replace_bar.cpp @@ -46,7 +46,7 @@ #include "scene/gui/text_edit.h" #include "scene/gui/texture_button.h" #include "scene/gui/tool_button.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" void EditorFindReplaceBar::_notification(int p_what) { diff --git a/editor_modules/text_editor/text_editor_vanilla_editor.cpp b/editor_modules/text_editor/text_editor_vanilla_editor.cpp index 175859b2e..72d145d98 100644 --- a/editor_modules/text_editor/text_editor_vanilla_editor.cpp +++ b/editor_modules/text_editor/text_editor_vanilla_editor.cpp @@ -18,7 +18,7 @@ #include "editor_code_editor/editor_code_text_editor.h" #include "editor_code_editor/editor_find_replace_bar.h" -#include "scene/resources/dynamic_font.h" +#include "scene/resources/font/dynamic_font.h" String TextEditorVanillaEditor::get_current_path() { return current_path; diff --git a/editor_modules/text_editor/text_file_editor.cpp b/editor_modules/text_editor/text_file_editor.cpp index 5650719c0..a31917bd9 100644 --- a/editor_modules/text_editor/text_file_editor.cpp +++ b/editor_modules/text_editor/text_file_editor.cpp @@ -24,7 +24,7 @@ #include "scene/gui/separator.h" #include "scene/gui/split_container.h" #include "scene/gui/text_edit.h" -#include "scene/resources/dynamic_font.h" +#include "scene/resources/font/dynamic_font.h" void TextFileEditor::connect_signals() { file_list->connect("confirmed", this, "update_list"); diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index cb12e0b9a..c1368b06b 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -35,7 +35,7 @@ #include "core/version.h" #include "scene/main/canvas_layer.h" #include "scene/main/viewport.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h" #include "scene/resources/world_2d.h" diff --git a/scene/3d/label_3d.h b/scene/3d/label_3d.h index cf55352a5..c7d65cad0 100644 --- a/scene/3d/label_3d.h +++ b/scene/3d/label_3d.h @@ -32,7 +32,7 @@ #define LABEL_3D_H #include "scene/3d/visual_instance.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/material.h" class TriangleMesh; diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index cdf1e5b7f..441d57fd1 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -46,7 +46,7 @@ #include "scene/animation/scene_tree_tween.h" #include "scene/debugger/script_debugger_remote.h" #include "scene/gui/control.h" -#include "scene/resources/dynamic_font.h" +#include "scene/resources/font/dynamic_font.h" #include "scene/resources/material.h" #include "scene/resources/mesh.h" #include "scene/resources/packed_scene.h" diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp index 58dab1a3a..a08a697e7 100644 --- a/scene/register_scene_types.cpp +++ b/scene/register_scene_types.cpp @@ -150,7 +150,7 @@ #include "scene/resources/shapes_2d/convex_polygon_shape_2d.h" #include "scene/resources/shapes/cylinder_shape.h" #include "scene/resources/default_theme/default_theme.h" -#include "scene/resources/dynamic_font.h" +#include "scene/resources/font/dynamic_font.h" #include "scene/resources/gradient.h" #include "scene/resources/shapes/height_map_shape.h" #include "scene/resources/immediate_mesh.h" diff --git a/scene/resources/SCsub b/scene/resources/SCsub index af5d46cff..004ab6148 100644 --- a/scene/resources/SCsub +++ b/scene/resources/SCsub @@ -46,6 +46,13 @@ env.add_source_files(navigation_obj, "navigation/*.cpp") for o in navigation_obj: scene_obj.append(o) +# font +font_obj = [] +env.add_source_files(font_obj, "font/*.cpp") + +for o in font_obj: + scene_obj.append(o) + env.scene_sources += scene_obj # Needed to force rebuilding the scene files when the thirdparty code is updated. diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/font/dynamic_font.cpp similarity index 100% rename from scene/resources/dynamic_font.cpp rename to scene/resources/font/dynamic_font.cpp diff --git a/scene/resources/dynamic_font.h b/scene/resources/font/dynamic_font.h similarity index 99% rename from scene/resources/dynamic_font.h rename to scene/resources/font/dynamic_font.h index 2e298ac61..61db650e2 100644 --- a/scene/resources/dynamic_font.h +++ b/scene/resources/font/dynamic_font.h @@ -37,7 +37,7 @@ #include "core/os/mutex.h" #include "core/os/thread_safe.h" #include "core/containers/pair.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/texture.h" #include diff --git a/scene/resources/font.cpp b/scene/resources/font/font.cpp similarity index 100% rename from scene/resources/font.cpp rename to scene/resources/font/font.cpp diff --git a/scene/resources/font.h b/scene/resources/font/font.h similarity index 100% rename from scene/resources/font.h rename to scene/resources/font/font.h diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h index 9181c6130..80cca9adb 100644 --- a/scene/resources/primitive_meshes.h +++ b/scene/resources/primitive_meshes.h @@ -30,7 +30,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/mesh.h" ///@TODO probably should change a few integers to unsigned integers... diff --git a/scene/resources/theme.h b/scene/resources/theme.h index 8b126f8c9..ada799e8b 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -32,7 +32,7 @@ #include "core/io/resource_loader.h" #include "core/object/resource.h" -#include "scene/resources/font.h" +#include "scene/resources/font/font.h" #include "scene/resources/shader.h" #include "scene/resources/style_box.h" #include "scene/resources/texture.h"