Repository: godotengine/godot (language: cpp)

Issue:
SVG project icon is no longer displayed correctly since 4.4.beta2
### Tested versions

Godot 4.4 beta 3

### System information

windows 10

### Issue description

When selecting a project in Godot Engine 4.4 Beta 3, no SVG icons are displayed (just empty space). This issue started in version 4.4 Beta 2 and persists in Beta 3. The affected icons were created in Inkscape (version 1.4) and worked correctly in previous versions of Godot (e.g. 4.3 or 4.4 Beta 1).

### Steps to reproduce

When selecting a project in Godot Engine 4.4 Beta 3

### Minimal reproduction project (MRP)

![Image](https://github.com/user-attachments/assets/6b851bc1-4ce5-4628-8fa1-afee710eebfa)


Discussion / hints:
Please upload a minimal reproduction project[^1] to make this easier to troubleshoot.

[^1]: A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the `.godot` folder in the archive (but keep `project.godot`).<br><br>Drag and drop a ZIP archive to upload it. **Do not select another field until the project is done uploading.**<br><br>**Note for C# users:** If your issue is *not* C#-specific, please upload a minimal reproduction project written in GDScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available. 
I can't reproduce it when creating new projects which use `icon.svg` by default. So this is likely specific to the SVG icons you're using; could you share some of them?

We did update ThorVG in 4.4.beta2 (#101347) so that might indeed be a regression from our SVG loading library.
I also tried creating a simple SVG icon in Inkscape 1.4 and exporting it with the types:
- Inkscape SVG (*.svg)
- Plain SVG (*.svg)
- Optimized SVG (*.svg) with default settings

All of these appeared to display correctly in the Project Manager.
The process I do is to create an icon in .PNG, I still use the paint XP program, then I open that image in Inkscape 1.4 and without vectorizing it I just save it as .SVG, this was displayed correctly before the godot 4.2 version.
It would be really helpful if you shared one such SVG (you can zip it and drag and drop to GitHub to upload).
[ICON+PAINTXP.zip](https://github.com/user-attachments/files/18770434/ICON%2BPAINTXP.zip)
Looks like I was just able to reproduce it:

![Image](https://github.com/user-attachments/assets/c23ef33a-ea0f-4b5e-a96d-666bb5c55e53)

Here's the icon.svg I used:
![Image](https://github.com/user-attachments/assets/f6de83d6-8527-4c19-804c-7223d3de188f)
woow, it also happened to you using the process of creating an icon in png in paint XP and then saving it as SVG in Inkscape 1.4 without vectorizing it, right?
Yep! Although in my case, the PNG was made with Affinity Designer on the iPad. But I tried importing it into Inkscape as an embedded PNG and saving it as an "Inkscape SVG" without vectorizing the PNG, and the icon wouldn't display in the Project Manager.

On c11863cc5 (before #101347 was merged), the icon does appear:

![Image](https://github.com/user-attachments/assets/d06d442a-d1b2-4af7-acaf-be64f5ed1cf9)

On df7572f (where #101347 was merged), the icon doesn't appear:

![Image](https://github.com/user-attachments/assets/81674a3a-2795-480a-a535-3bdcc4429792)

So it does indeed appear to be a regression from ThorVG.
Thanks both, I'll look into it.
Congratulations, you do a great job as a team! I wish you the best of luck. The Godot engine is improved by people like you two who love making dreams come true.
Seems like it's missing `THORVG_FILE_IO_SUPPORT` define in SVG module (new option in the last update), which disables embedded PNG loading.

Fix patch:
diff --git a/modules/svg/SCsub b/modules/svg/SCsub
index 83321cf4493b..696e1649489d 100644
--- a/modules/svg/SCsub
+++ b/modules/svg/SCsub
@@ -69,6 +69,8 @@ env_svg.Prepend(CPPPATH=[thirdparty_dir + "inc"])
 
 # Enable ThorVG static object linking.
 env_svg.Append(CPPDEFINES=["TVG_STATIC"])
+# Explicit support for embedded images in svg.
+env_svg.Append(CPPDEFINES=["THORVG_FILE_IO_SUPPORT"])
 
 env_thirdparty = env_svg.Clone()
 env_thirdparty.disable_warnings()


Test patch: