godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.85k stars 20.15k forks source link

Theme file became huge after embedding image/font data #95729

Open raykkitsune opened 3 weeks ago

raykkitsune commented 3 weeks ago

Tested versions

4.3 release

System information

Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated Radeon RX 5500 XT - Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz (24 Threads)

Issue description

crash when i click or try to grab the file, i just created the theme and it got imense size (160mb)

Steps to reproduce

idk if that works but i created a font for a textedit node, and modify the background to pink when focus, that was it, now the theme file has 160mb

Minimal reproduction project (MRP)

ill not be able to send a minimal reproduction due the theme size problem, but the project is small, i swear, i'll send it via google drive https://drive.google.com/drive/folders/1AkIHQ18KEB9qEXxPLN3TsjtkEy_HLMtH?usp=drive_link

Calinou commented 3 weeks ago

This is likely because you embedded the entire theme data (or a font's data) into a text-based resource. To avoid this, save the font data into an external .res file using the Save option in the corresponding resource dropdown.