This is just perfect. Anyway, if I have a custom font downloaded from somewhere, how can use that font for a text? Where should I put it (what folder)? Or user should install that font first?
@Dalvengyr, I spent some time looking for a scenario a know had a 'True type font' file in a 'fonts' folder within the scenario folder. It also had a FontLoader class with it. I was hoping to share that with you, but was having trouble finding that scenario on the site (it may have been removed).
private void createCounters() { boardLabel = new Text("BOARD " + board); addObject (boardLabel, 670, 120); tryLabel = new Text("Nyawa: " + tries); addObject (tryLabel, 670, 150); rollsLabel = new Text("Kesempatan : " + rolls); addObject (rollsLabel, 670, 200); scoreLabel = new Text("Score: " + score + " "); addObject (scoreLabel, 670, 230); } i tried to change Text into TextImage, but error. so what should i do, n what should i write on the Board class to make it bold
A new version of this scenario was uploaded on 2017-01-22 09:22:54 UTC
Fixed some constructorss missing default values.
With the listFonts() method in only shows the last 45 fonts that I have. I made my own method in the class which saves the fonts to a text file and it shows ALL my fonts.
I just saw "NOTE: DO NOT MODIFY THIS CLASS -- except for the five static 'default' fields in the modifiable section below fields.".
But I technically could edit it, just maybe before I do too much testing I should copy it into the Greenfoot folder mentioned above (I also just saw that).
"Copy the TextImage.JAVA file from the project folder to your 'Greenfoot/lib/greenfoot/common' folder to allow easy addition into your scenarios using the 'Edit>Import class...' option from the menubar."
Why not the CLASS file, that way it will be there but you won't see it in the Greenfoot sidebar? (But I guess then it might not show up in the import class list, I don't know much about it.)
As far as the number of fonts showing up -- you probably have the terminal set to limited output. On the terminal frame menubar, go to 'options>Unlimited buffering'.
The class can now only be used locally (not on a site). For help on error, create a discussion thread. Show class of code where error is located and indicate what error you are getting and at which line it occurs.
2014/8/14
2014/12/4
2014/12/4
2015/7/1
2017/2/16
2017/2/16
2017/2/16
2017/2/16
2017/2/17
2022/2/14
2022/2/14