I’m not sure if you even can stretch it out like that. The thing is that the font you are using is actually a bitmap of a certain size. So to remedy this, you should just use bigger bitmap font. You can generate these bitmap fonts from the regular fonts by using the jMonkeyEngine SDK or AngelFont tool.
In the first thread they talk about “textSize effect applied to onActive” but I wasn’t able to reproduce it.
I should use the biggest bitmap font as possible and then the height will scale it down?
Edit: I tried this but it didn’t work. Is there any way I can scale the bitmap instead?
Yeah, but I remember this being very difficult in Nifty. It’s one of the reasons I switched. I used one of the effects for it but new versions of nifty would break that and then I’d have to slightly rework it.
If OP is just using this for pop-up text or something then we might be able to offer some simple alternatives. If it’s part of an existing form/UI then I’ll let others provide Nifty tech support… edit: but I remember this being difficult.
Is there a problem using different font sizes? We actually have 16 different font sizes that we just use. That is 16 different fonts to Nifty. You can generate them quite quickly and that is it, only need to do once.
Lemur is better in many ways. My only issue is with object count on mobile devices, though it is more of a mobile problem in general. You can alleviate it with a more mobile friendly style.
In a new project I would definitely recommend you give it a try. The new animation system gives homage to it’s tween system too. It has recent commits and solid framework if you’re willing to learn generics. Ive always used it since I started a couple years back maybe.
I would like to avoid using different font sizes, because I was a continuous range that scales automatically with the resolution. The text is part of a bigger form.
You can use an “onActive” effect textSize. Scaling the bitmap like that tends not to look great, however.
@glh3586 Can you give me a code sample for that? I wasn’t able to do this.
BitmapText.setSize()
@jayfella can you give me a code sample for that? The method is not static, how do I get a BitmapText from here?