You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Godot's default rendering settings for fonts and icons is not the best for applications if they want to support HiDPI / UI Scaling.
For fonts, I would recommend turning on Multichannel Signed Distance Fields for font rendering. Some fonts however will create artifacts when used with MSDF, which requires trial and error with the Pixel Range and Size settings, or replacing with a font that does not have issues.
The default Mono font that GodSVG uses (JetBrains Mono) is one font that has bad rendering with MSDF no matter how hard you try to correct it, so in this case it would require being replaced with another.
For icons, you could import their SVGs with their scale set to above 1, however this would cause the buttons and related Control nodes to resize to match.
You can fix this by setting max_icon_width in the theme settings for Button and it's derived classes. Note that this will not work currently for CheckBox and CheckButton, but it has been fixed for 4.3.
There are a few places where GodSVG manually draws using draw_texture(). If used with upscaled SVGs as is, these would also break.
Changing them with draw_texture_rect(tex, Rect2(Vector2.ZERO, [original texture size], false) would fix the issue.
I had already made all these changes on my local copy of the project to test if it would work before submitting this request. I won't be submitting a PR though, as I have done them in a very straight way with no possibility of customizing it.
The text was updated successfully, but these errors were encountered:
Thanks for this proposal! In theory, we agree with everything here. In practice, the reason we're not dealing with it is because we hope that godotengine/godot#86022 will make it into Godot 4.4, which would allow us to test it and see if it works. (The first GodSVG stable will probably not release in Godot 4.3). This is mainly to deal with the fact that you need hacks to deal with the issues.
You can fix this by setting max_icon_width in the theme settings for Button and it's derived classes. Note that this will not work currently for CheckBox and CheckButton, godotengine/godot#91700.
This is the worst hack of the ones that would be needed. I'm aware of the possibility, it's just that it would be a sort of last resort.
I'll keep this proposal around as it outlines excellently everything that is needed.
Godot's default rendering settings for fonts and icons is not the best for applications if they want to support HiDPI / UI Scaling.
For fonts, I would recommend turning on Multichannel Signed Distance Fields for font rendering. Some fonts however will create artifacts when used with MSDF, which requires trial and error with the Pixel Range and Size settings, or replacing with a font that does not have issues.
The default Mono font that GodSVG uses (JetBrains Mono) is one font that has bad rendering with MSDF no matter how hard you try to correct it, so in this case it would require being replaced with another.
For icons, you could import their SVGs with their scale set to above 1, however this would cause the buttons and related Control nodes to resize to match.
You can fix this by setting
max_icon_width
in the theme settings for Button and it's derived classes. Note that this will not work currently for CheckBox and CheckButton, but it has been fixed for 4.3.There are a few places where GodSVG manually draws using draw_texture(). If used with upscaled SVGs as is, these would also break.
Changing them with
draw_texture_rect(tex, Rect2(Vector2.ZERO, [original texture size], false)
would fix the issue.I had already made all these changes on my local copy of the project to test if it would work before submitting this request. I won't be submitting a PR though, as I have done them in a very straight way with no possibility of customizing it.
The text was updated successfully, but these errors were encountered: