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
The Label3D node backported to 3.x in #61276 exhibits weird glyph scaling and linewrapping behavior when the project's window viewport scaling mode is set to 2d and dynamicfont oversampling is not disabled:
One of these issues, the unstable linewrapping, is #56399.
The other issue, with the individual glyphs being missized and misplaced, is specific to Label3D, and is why I'm opening a new issue. Updating the text or width of the Label3D after shrinking the window does not cause the missized/misplaced glyphs to re-flow.
4.0 probably does not have the first issue. I have no idea whether 4.0 would have the second issue.
Steps to reproduce
Make sure dynamic font oversampling is enabled in project settings
Set project window viewport scale mode to "2D"
Put a dynamicfont and some text in a Label3D. Enable autowrap and reduce the width property to something that wraps
Run the project, resize the game window, and observe brokenness. (these issues don't happen in-editor)
You can add an identical autowrapping Label node with the same font, text, and width if you want to compare line wrapping oddities.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
One workaround could be to disable font oversampling on fonts used in a Label3D.
That said, I think it'd be better if font oversampling working on Label3D, with the pixel size automatically being decreased to account for the greater font size.
One workaround could be to disable font oversampling on fonts used in a Label3D.
Oversampling can only be disabled on a per-DynamicFontData basis, right? That might be a gotcha for users of Label3D, since games frequently share font resources between DynamicFonts used in different places. They'd have to duplicate it/make it unique first.
That said, I think it'd be better if font oversampling working on Label3D, with the pixel size automatically being decreased to account for the greater font size.
I don't think this would work very well with the dynamicfont oversampling system, because of 3d perspective. Maybe just for billboarded fixed-size things. Or maybe with runtime-generated SDFs? But 3D-perspective SDFs can't work 100% properly in GLES2, because it lacks screenspace derivatives... I dunno, just spitballing.
I don't think this would work very well with the dynamicfont oversampling system, because of 3d perspective
It might turn out OK if mipmap generation is enabled on the Label3D. Font oversampling wouldn't be performed every frame when the camera moves, just when the window size changes.
Or maybe with runtime-generated SDFs?
Unlike master, Godot 3.x doesn't support generating SDFs from DynamicFont files. Only bitmap fonts can be imported this way, and it's not as convenient as in master. It also looks worse at smaller sizes, as it doesn't use multi-channel SDF.
Godot version
3.5
System information
Windows 10
Issue description
The Label3D node backported to 3.x in #61276 exhibits weird glyph scaling and linewrapping behavior when the project's window viewport scaling mode is set to 2d and dynamicfont oversampling is not disabled:
godot.windows.opt.tools.64_2022-05-28_21-15-10.mp4
One of these issues, the unstable linewrapping, is #56399.
The other issue, with the individual glyphs being missized and misplaced, is specific to Label3D, and is why I'm opening a new issue. Updating the text or width of the Label3D after shrinking the window does not cause the missized/misplaced glyphs to re-flow.
4.0 probably does not have the first issue. I have no idea whether 4.0 would have the second issue.
Steps to reproduce
You can add an identical autowrapping Label node with the same font, text, and width if you want to compare line wrapping oddities.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: