March 27, 2011 at 17:17 #19362+8
to create fonts for your jME3 applications and NiftyGUI interfaces I now added a font creator to jMP. Just select a project and press “New File”, then select “GUI” -> “Font”, you will be presented with a list of all fonts installed on your computer:
After selecting a font you can configure the bitmap and font size to fit the font to the image:
When pressing “Finish” a PNG and FNT file will be created in the Interface/Fonts/ assets directory, you can use the font e.g. in NiftyGUI by specifying e.g. font=”Interface/Fonts/Arial.fnt” in a nifty text tag.
Available in the nightly update center, you have to install the plugin manually.
Work in progress, please tell me about any problems you encounter. I also don’t know what all of the parameters in the fnt file really do, if you see errors or problems, please give me a note.
NormenMarch 27, 2011 at 18:25 #130682
thx a lot for that tool. Very useful!!! Will test that laterMarch 27, 2011 at 18:37 #130683
WOW!!! Thank you!!! Awsome!March 27, 2011 at 18:52 #130684
will check and report.
any future plan about adding features like color, gradient, outline, shadow like “Hiero”?March 27, 2011 at 19:42 #130685
any future plan about adding features like color, gradient, outline, shadow like “Hiero”?
Should be easy, just look at the code, post the patch files in the contribution forum Color is variable through text support in jme.March 27, 2011 at 20:17 #130687
Selection of the basic font styles (plain, italic, bold) has been added (will only be available in the next nightly though).
P.S. Creasy, I saw your post Its really easy jMP code, if you want to take a whack at it, theres docs on how to build the sdk and change stuff in the wiki.March 27, 2011 at 20:52 #130688
okey, i will give it a shot.March 30, 2011 at 19:02 #130689March 30, 2011 at 19:52 #130690
You have more pixels Basically the same as using a 1024 or a 2048 texture.. More mem usage and sharper display.April 9, 2011 at 21:12 #130691
I was create font with Cyirilic symbols, load them:
Java1234567String text = "TEST test ТЕСТ тест …\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 …";BitmapFont myFont = assetManager.loadFont("Interface/Fonts/CyrillicRibbon.fnt");BitmapText hudText = new BitmapText(myFont, false);hudText.setSize(myFont.getCharSet().getRenderedSize()); // font sizehudText.setText(text); // the texthudText.setLocalTranslation(200, hudText.getLineHeight(), 0); // positionguiNode.attachChild(hudText);
All Cyrillic symbols was not shown.
(Ubutu 10.10)April 9, 2011 at 21:14 #130692
Well you see what symbols it exports when you create the file, its just the 255 ascii chars for now.April 9, 2011 at 21:19 #130693
Yes, i was seen them. (It was one font, when I see cyrillic simbols, other font was show square box).April 3, 2012 at 05:34 #130694
This is a great tool!
If I have some time, I may take a look at the source code. But in the meanwhile, here are my thoughts about features and tweaks :
- calculate image size automatically (or replace image size by a bpp combo box) for optimal size.
- optionally let the user enter the desired characters in a text field (use default character set, or a custom one)
- add a charset encoding drop-down list to select the encoding to use when generating the font
- add a final step : Set font nameApril 3, 2012 at 06:30 #130695
- add a final step : Set font name
You can change the name in the last panel of the wizard (top right of the form).April 3, 2012 at 07:29 #130696
1) doesn’t really make sense, there is no “ideal” image size. That parameter is left in deliberately.
2) the character sets are defined as per the normal definitions, atm only ASCII is supported. support for UTF-8 etc. can and will be added at some point but not for random chatacter combinations
3) see 2)
4) see @nehon‘s answer
You must be logged in to reply to this topic.