-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
How to organize font oversampling for scaled control? #21797
Comments
Font oversampling uses a global scale factor (determined by window size when using the |
@Calinou if I'll try to handle "resize" event of control to change size (if it possible in Godot) of dynamic font - will it be a good and possible solution? |
@r3d9u11 I don't think that would work, since the DynamicFont will not be aware of the Control's scale. Besides, the same DynamicFont resource can be used in different Controls, each of them using their own scaling value — what would be done in this case? |
@Calinouin that case font size will be automatically changed for all similar controls, and controls, who uses another scaling value also should use also other dynamic font, I think. But as I see, currently Godot conception doesn't allow to change font size on the fly. Am I to understand that correctly? |
You don't have to, just use the |
@Calinou Yep, it is a good and fast solution, and game scene looks nice. But I trying to escape it globally. I tried to use game scene in the fullscreen mode: Or if I use Finally I want to stretch game scene to the full screen, but popup menu I want stretch to current desktop resolution and save proportions (and place it to the cetnter of the screen). I read some posts about multiresolution theme: |
@Calinou well, I found a similar issue, but solution with "scale" property looks bit ugly :-| Original size: Well, for the controls and labels I see one solution: use anchors + manually Import font for each screen resolution. |
@r3d9u11 To support multiple aspect ratios without distortion or black bars, use the |
@Calinou sorry, Yes, I used mode "expand" to keep proportions. But I want to use stretch behavior for different nodes. Shortly: I want to stretch background to full screen (and distort proportions), but in that time I want to stretch controls and save its proportions. Currently with global flag "Stretch" it is not possible. I should to implement this logic manually. |
Have you tried setting a TextureRect's anchor to Full Rect (while making sure the root Control node is also anchored as Full Rect)? This should make it cover the whole screen regardless of its aspect ratio. |
@Calinou thanks for hint! I'll check this solution soon. |
@Calinou many-many thanks!!! I should to use "Node/Node2D" as a Root node + Layout/Anchors settings for controls + Stretch:2d/Expand for project. Works fine and looks nice with different resolutions 😊 |
Hi. Is it possible to organize font oversampling for scaled control?
Stretch Mode is Disabled and Use Oversampling is Checked.
Now font doesn't changes:
Thanks.
The text was updated successfully, but these errors were encountered: