1.11 Cannot set color on labels using the new default `lsans-15.fnt` font
See original GitHub issuePlease ensure you have given all the following requested information in your report.
Issue details
After upgrading to 1.11, our previous white colored arial-15.fnt is now a dark brown/black and regardless of the label style, it will always stay that color.
Screenshot (1.11): https://i.imgur.com/KE8bpsJ.png
Screenshot (1.10): https://i.imgur.com/EJ0DHU9.png
Reproduction steps/code
Create a new screen with the following code and display it on a stage.
font = new BitmapFont();
label = new Label("Checking for updates...", new Label.LabelStyle(font, Color.WHITE));
label.setAlignment(Align.bottom);
stage.addActor(label);
Version of libGDX and/or relevant dependencies
1.11.0
Stacktrace
N/A
Please select the affected platforms
- Android
- iOS
- HTML/GWT
- Windows
- Linux
- macOS
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Default label font colors has mind of its own
If you change the font for the labels, then all the label fonts go black. One minute I enjoyed the smart contrast between...
Read more >How to change the default color of field labels ?
When I place a field and it's label on a layout, the label text color is white and since I use a white...
Read more >libgdx/CHANGES at master · libgdx/libgdx - GitHub
png have been replaced with lsans-15.fnt and lsans-15.png; this may change some text layout that uses the built-in font, and code that expects...
Read more >Chart label Font Not Changing Colour - Microsoft Community
Currently working on a presentation and the font colour of the labels will not change colour. Can someone point me in the direction...
Read more >Not able to change data label font color - Enterprise DNA Forum
I experimented with all using gradient, rule and field but none is working as desired. Suppose i want to change data label color...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would try tracking down where in your original game you could be calling dispose() before or during the screen you showed; maybe something changed in the disposal logic for some class, but there’s no way we can tell what it could be without looking at your code.
EDIT: I found https://github.com/libgdx/libgdx/pull/6536 , which doesn’t seem to be likely to be the culprit, but it is a change to how AssetManager handles disposal in 1.11.0.
Yeah, the Texture used by the BitmapFont could easily be disposed, which would cause this.