I'm running GroovyConsole 2.4.13 on Windows 10. I want to change the font of the text area and of the output window. I can't find out how to do this. Can it be done? Wasn't it possible in a previous version? Did Apache take that feature away?
-
I'm using version 2.4.4 and the only option is make the text larger or smaller. – craigcaulfield Dec 20 '17 at 04:38
-
I would like to add to this question that the font color is light grey on yellow in my Linux Mint development environment which uses dark themes. With the output nearly unreadable it makes the console essentially useless. It should not be hard to create a font type/color preference setting? I would do it myself but I'm not sure what java file it is in... – JesseBoyd Dec 30 '17 at 18:18
1 Answers
Here's a partial answer. The JRE can use a file called fontconfig.properties
that determines what fonts it uses. On Windows it is located in %JAVA_HOME%\lib
. At that location there is a default file called fontconfig.properties.src
. If you make a copy of it without the .src extension and put it in the same place as the default file, the JRE will use it. It contains a section like this:
monospaced.plain.alphabetic=Courier New
monospaced.plain.chinese-ms950=MingLiU
monospaced.plain.chinese-ms950-extb=MingLiU-ExtB
monospaced.plain.hebrew=Courier New
monospaced.plain.japanese=MS Gothic
monospaced.plain.korean=GulimChe
monospaced.bold.alphabetic=Courier New Bold
monospaced.bold.chinese-ms950=PMingLiU
monospaced.bold.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bold.hebrew=Courier New Bold
monospaced.bold.japanese=MS Gothic
monospaced.bold.korean=GulimChe
monospaced.italic.alphabetic=Courier New Italic
monospaced.italic.chinese-ms950=PMingLiU
monospaced.italic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.italic.hebrew=Courier New
monospaced.italic.japanese=MS Gothic
monospaced.italic.korean=GulimChe
monospaced.bolditalic.alphabetic=Courier New Bold Italic
monospaced.bolditalic.chinese-ms950=PMingLiU
monospaced.bolditalic.chinese-ms950-extb=PMingLiU-ExtB
monospaced.bolditalic.hebrew=Courier New Bold
monospaced.bolditalic.japanese=MS Gothic
monospaced.bolditalic.korean=GulimChe
If you change the values of monospaced.*
, then the JRE will use whatever font you specify. So, with this file, and with all the monospaced fonts changed to Consolas, GroovyConsole now uses Consolas. But since this file works at the JRE level, all Java apps now have Consolas as their default monospaced font, so this changes more than what I was looking for, but I can live with that.

- 1,619
- 1
- 13
- 21