I have a very simple problem, but so far I could not find anything to solve it. I want simply make the text of Lemurs Label bold, I see there are setters for colours and shadow colours and alignment but not for make the text of the label bold. Is there a simple way?
Hmm at first glance you’d use something like:
Label label = ... BitmapFont font = label.getFont(); font.setStyle(INT_CONSTANT_FOR_BOLD_IN_THIS_FONT); label.setFont(font);
but if there’s only one (regular) style defined in this font, then you have to setup BitmapFont separately via
BitmapFont boldFont = assetManager.loadFont(<your bold font>); label.setFont(boldFont);
or something, I guess…
(I have my project all the way disassembled, so can’t compile and check myself right now if it works)
Yep, exactly as Torsion says.
The font is what controls bold or not bold.
Cool. Thanks. That was exactly what I was looking for
Btw speaking of fonts how do you make sure whether this or that font is free for use or licensed/copyrighted? I know there are plenty of sites around with contradictory statements, but what to rely on in practice?
Personally, I just check the pedigree of the font if I can… or I don’t use it. It’s not different than using textures really.
For my games, I purchased fonts.