question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.11 Cannot set color on labels using the new default `lsans-15.fnt` font

See original GitHub issue

Please 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:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tommyettingercommented, Jul 22, 2022

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.

1reaction
tommyettingercommented, Jul 22, 2022

Yeah, the Texture used by the BitmapFont could easily be disposed, which would cause this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found