-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
RichTextLabel width changes on changing the window size when using the 2d
stretch mode due to font oversampling
#22580
Comments
Still valid in 3.2.2 rc4 On master the window viewport scaling doesn't seem to work, so it's not possible to test this properly. |
This bug is likely due to RichTextLabel performing a different kind of rounding for font metrics compared to Label.
You can set Extra Spacing > Char in the RichTextLabel's DynamicFont to 1 or 2. It should make fonts look closer to how they would look like when used in a Label. |
2d
stretch mode due to font oversampling
This is also an issue for me. |
You were close, it was an issue with assigning float values to integer variables :) My PR fixes this issue, but I still have edge case where the last character from CJK font is not wrapped to the next line like in Label (so there is still some tiny difference in calculation). And before the fix (Labels on the left, RichTextLabels on the right) Try switching to 1280x720 in this MRP: |
Fixed by #52752. |
Godot version: 3.1 80d6bb7
Issue description: The width of a RichTextLabel's text relative to the window changes on resizing with the following conditions:
This does not happen with Labels! Default screen size on top, slightly resized window on the bottom. The first line is the Label, the second is the RichTextLabel:
The Label's width does change slightly, but it's much less egregious:
I would expect the RichTextLabel text to be the same as a Label and the value reported by
font.get_string_size()
...Minimal reproduction project: FontTest.zip
The text was updated successfully, but these errors were encountered: