-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Multiple Text objects using the same Font object overwrite each other #2411
Comments
@DaVince Thanks for the issue! Definitely a bug! Feels like I've fixed this one before, you should be able to re-use the fonts as you expect. |
Doh, definitely a regression I should have a fix up soon (with a better test to prevent this from happening again) Related #2152 |
eonarheim
added a commit
that referenced
this issue
Jul 14, 2022
5 tasks
eonarheim
added a commit
that referenced
this issue
Jul 16, 2022
Excellent, thanks so much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When creating more than 1 Label or Text that use the same Font, Excalibur gets confused and overwrites the contents of previous Labels. It also offsets the x positions of the Labels randomly.
Steps to Reproduce
Code example:
My code:
Expected Result
Two labels with their own relative text and positions should appear.
Actual Result
The two labels appear, but they both have the text from the last label created.
Environment
Current workaround
Creating a clone of the Font object with the
.clone()
method for each Label and Text object.Additional information
Attached is the full output of one of the WebGL warnings that appears in the console: BindTexturesError.txt
This error also happens in Firefox, though the console message is worded differently:
The text was updated successfully, but these errors were encountered: