-
-
Notifications
You must be signed in to change notification settings - Fork 23.3k
Apply MSDF fonts theme to AnimationTreeEditor #110462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it works as expected.
Some feedback:
- The font should only applied to GraphEdit, not the rest of the AnimationTree editor. This prevents fonts such as this one from looking different (and blurrier) than the rest of the editor:

In other words, MSDF fonts should only be used where the zoom level can dynamically be changed.
f52812d
to
c9e3355
Compare
Thanks @Calinou I moved the fix to Can you shed some light on how |
aab9483
to
31d6bbf
Compare
I've been wrestling with the pre commit hooks a bit.
I'd appreciate someone taking a closer look at my workarounds since maybe there's a simple way to handle this. Question: since GraphEdit is a usuable node in a shipped game, should the default font be msdf outside the editor as well? |
Files in
GraphEdit/GraphNode are also usable in exported projects, e.g. in Material Maker. |
31d6bbf
to
d2847c8
Compare
d2847c8
to
d81558b
Compare
This PR is an attempt to address #91814
As suggested by @Calinou, I based my solution on the approach used in visual_shader_editor_plugin.cpp.
Changes included:
AnimationTreeEditor
, instantiated in the constructorupdate_theme()
functionupdate_theme()
from the constructor, immediately after creating the theme, sinceAnimationTreeEditor
does not have an_update_graph
function like inVisualShaderEditor
AnimationTreeEditor
itself (set_theme
) so that all childAnimationTreeEditorPlugin
inherit it.Applying it to the individual plugins also works, but seems redundant.
This replaces the default font with and MSDF font that scale better.