@pspeed said:
Regular fonts scale in JME. This was a limitation of Nifty itself but some time back nifty added the ability to scale the whole UI... which makes the most sense in these cases.
That's fabulous!
I didn't notice that update, but testing it out just now it seems to work great.
You always make yourself problems where there aren’t any… you get the OS compatibility for free. The only thing you have to keep in mind is paths, so use File.separator when creating directory strings. And that piece of code I gave you is when you set fullscreen by hand, OSX apparently expects a frequency of 0. But that is all! And if you don’t have to set JVM parameters, you can just spread your .jar + libs + data without OS specific bundles.
And OSX is actually pretty good for testing, because it has a strict shader compiler and crappy-slow graphics drivers so if it works on Mac, it works everywhere
Now I will hijack this thread, @pspeed: How exactly is this scaling working? Do you have a link? I need that text scaling very badly and don’t want to use 5 different font files that just differ in their character size…
@Dodikles said:
Now I will hijack this thread, @pspeed: How exactly is this scaling working? Do you have a link? I need that text scaling very badly and don't want to use 5 different font files that just differ in their character size...
You mean in nifty or JME?
In JME, if you have BitmapText you can just setLocalScale() on it.
It works ok, but as you might expect, resizing bitmap fonts too much might not look as good as you want.
The best approach might be to just create your user interface to use relative layout positions and sizes and only rescale the text if really necessary. If possible, you could also let the user resize GUI elements. If it’s not a too complicated interface I doubt it would be a problem.