Hello, i asked the question in the tonegod section but it look like that part of the forum is inactive, this is why am asking here.
I want to change the font of my text. I try to use the setFont(String font) methode (Where most of the time that font was “Arial”, just for test) but it just send me a error every time. I look at the fonction definition and it look like i should send the link of the font as a String but i can’t find those link, no matter how hard I seek.
Plus am trying to change the animation on the Textfield and button because they are flashing way to much. Then again i did check the tutorial portion of tonegod but it look like i can’t find any valuable info
Can anyone help me or guide me in the good direction?
Okay after some work i can tell everyone how to get a font for ToneGod on eclipse
Step 1: dowload the font you want. Usaly it will come as a .fft
Step 2: click on the font then click on instal. On window yu should see it on the top left of the screen that just pop in your face
Step 3 : In JME3 go seek in file the option new file. Then go in GUI and go to creat a new Font.
Step 4 : select the font you want in your application. If you can’t find it go and apply the step 2.
Step 5 : go inside the JMoneyKey file where your projet is save. Go and seek in the asset section and find your new fnt file. Copie it AND every png file that come whit it inside a new (or old) package in the eclipse.
Step 6 : put a setFond(String path) on the object(like Textfield or label) you want to set the font. Make the reference of your package this way : “PackageName/MyFontName.fnt”
Anyone who can answer your question in this section would have also seen your post in the other section.
I’m sure they will probably need more information about the error than “got an error” though.
Well the methode simply don’t work cause i can’t find the path to the font and i am just puting the name of the font and not the path:/ It fell to me like i should creat the font into a file then link the setfont to that file, but am not realy sure about that
Also it been five day since i posted my question on the tonegod and no one even try to anwser. Am also starting to think no one will anwser. Is tonegod still supported and update or is it kinda dead/dying?
A font is an asset like any other. You have to specify the path to the asset like any other. This is presuming that tonegodgui is using JME assets like normal.
So how do i build the asset? get any tutorial anywhere cause i can’t find anything on google when i type something like asset font java
No i mean how do i put a font into the asset. but o well after some reserch i realise my problem : i have been seeking font for java, and that gave me false result. But when i just write font file i can find a lot of stuff, am gona try them and am pretty sure it will work. Nooby mistake, my bad.
still one thing : As ttf format seem not supported, what font type is?
My only problem left is the very aggressive button/Textfield animation
You can make a new .fnt by going to new -> file -> font and then selecting the font you want.
Then that new .fnt will appear in your interface/fonts folder.
You can then load this font via a string using assetManager.loadFont(“Interface/Fonts/This.fnt”);
Alright i got realy close of insanity but after hour and hour of work i may have fond my solution! Thanks you bob for this revelation.
The fact is am working on eclipse and i only use the class in JME, not the actual thing. Now after a short expidition in it i realise something : JME build font in is own way. And that is okay, but it make Tonegod that use JME way not able to connect whit the actual normal way to build a font.
But now i do have one problem left : i can’t import the Interface assets inside the eclipse projet and i need it the way it is build there. BUT i just make it possible by going direcly in the actual projet, copie paste the information into a package in eclipse and BAM job done, finaly, after like 5-6 hour in 2 day. Alright as my post is the first on google for that kinda question il just edit the first part to give direct anwser for people who may seek the same thing. But after i get some sleep.
Only thing left is the animation section. And some sleep.