This site requires JavaScript, please enable it in your browser!
Greenfoot back
Tsbrdain
Tsbrdain wrote ...

2012/8/10

Changing the font of Greenfoot's editor

Tsbrdain Tsbrdain

2012/8/10

#
I was wondering if there is a way to change the default font that Greenfoot uses in its editor. I don't think that the default font is bad, but I'd still prefer to use a font that I'm more comfortable coding with. In the preferences window, the only font option I saw was for changing the size of the text. I've also looked at other discussions to see if anyone else felt the same way and managed to find a solution , but the only results I found were for people who wanted to change their in-game font, not the one used in the editor. Any help with this would be greatly appreciated.
erdelf erdelf

2012/8/10

#
not sure, but look in your greenfoot directory, folder lib, open bluej.defs, line 333 and 344
danpost danpost

2012/8/10

#
I found mine at: BlueJ/lib/bluej.defs. I did not count the lines, but about two-thirds toward the end.
Tsbrdain Tsbrdain

2012/8/10

#
Earlier when I tried to find it, I went into the greenfoot.defs. Thanks guys, I tried line 333 and 344, but they didn't change the font in the editor. But now I know where to look!
Tsbrdain Tsbrdain

2012/8/10

#
Well, I got it changed to the right font I wanted, but for some odd reason it's like every line in the editor was cut in half and it's only showing the bottom half. I'm going to keep changing things and see if I can fix it for awhile.
danpost danpost

2012/8/10

#
You should finds the words 'fonts for Targets (classes in display)'. What you are looking for should be the immediate next line (351 in mine)
danpost danpost

2012/8/10

#
Sounds like you are going to have to find the line height value and change it also.
danpost danpost

2012/8/10

#
danpost wrote...
Sounds like you are going to have to find the line height value and change it also.
No. Just change the font size in your Options>Preferences.
Tsbrdain Tsbrdain

2012/8/10

#
I already tried changing the font size in preferences. It always shows the bottom half no matter what size I set it to.
Tsbrdain Tsbrdain

2012/8/11

#
I think I managed to get it working. I was trying to use a Monaco font, which is apparently too big. So I decided to go with Consolas and now it fits fine in between the lines. Thanks again for all the help.
erdelf erdelf

2012/8/11

#
Maybe the developers could implement a simple way to edit the font, maybe the same way like changing the font size
You need to login to post a reply.