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

2018/5/10

Fonts in Greenfoot

Agent40 Agent40

2018/5/10

#
I've been looking around and found past discussions saying that changing the default Font of greenfoot is not possible within a scenario. Since all of these were from 2016 and 2017 I was wondering if this has changed since then.
davmac davmac

2018/5/10

#
What do you mean by "changing the default Font"? You're correct that you can't change the default font, i.e. the font that you get when you use the default Font constructor. You can also use an alternative constructor to specify a font name, though it will only find system fonts (i.e. you can't make it use a TTF font included in your scenario). You can use a font created in this way to draw on an image. However, the GreenfootImage constructor which creates an image from text always uses the default font. I hope that clears it up.
You need to login to post a reply.