Skip to content
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

Label3D alignment does not appear to be accurate #89137

Closed
RichMakeGame opened this issue Mar 4, 2024 · 4 comments
Closed

Label3D alignment does not appear to be accurate #89137

RichMakeGame opened this issue Mar 4, 2024 · 4 comments

Comments

@RichMakeGame
Copy link

RichMakeGame commented Mar 4, 2024

Tested versions

v4.2.stable.official [46dc277]

System information

Godot v4.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i3-10100 CPU @ 3.60GHz (8 Threads)

Issue description

I'm using label3D and need to use top/left alignment and have consistent placement when the font size changes, however the Left / Top alignment does not keep the top/left of the text plane in a consistent position. Similar issue is present with Right/Bottom. At default settings and font size of ~286 the text drifts -0.5 units in y

all these label3D items have the same transform, top/left alignment, just different font size:
label3d_align

Steps to reproduce

Add a label3d to a 3d project, write some text eg 'Test text'
set alignment to Left and Top, and snap view to front orthogonal
alter font size from 1 up to 350 and notice the alignment starts above left of the origin and strays right and quite far below

a similar problem occurs if set to Right and Bottom alignment

Minimal reproduction project (MRP)

3dlabel_align_issue.zip

@akien-mga
Copy link
Member

CC @bruvzg

@bruvzg
Copy link
Member

bruvzg commented Mar 4, 2024

I do not think it's bug and not Label3D specific (the only Label3D specific part, it's showing bounding box of the visible part). The left edge of the T top line is not a left edge of the glyph, and text is aligned to the glyph edge (other apps do the same):

Screenshot 2024-03-04 at 14 46 03

@RichMakeGame
Copy link
Author

Ahaa ok I see, so it is actually scaling correctly its just I was confused by the bounding box?

@akien-mga
Copy link
Member

Closing as this was apparently not a bug, but not #89145 should fix the bounding box to make it clearer.

@akien-mga akien-mga added archived and removed bug labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants