font size of Squirrel SQL too small

Here is what worked for me (Windows 10 64-bit, SQuirrel 3.9.1, jrw1.8.0_211)

At the bottom of C:\Program Files\squirrel-sql-3.9.1\squirrel-sql.bat, I changed the start command to this:

start "SQuirreL SQL Client" /B "%LOCAL_JAVA%"^
 -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true^
 -Dswing.plaf.metal.controlFont=Tahoma-18^
 -Dswing.plaf.metal.userFont=Tahoma-18^
 -Dswing.plaf.metal.titleFont=Tahoma-18^
 -Dswing.plaf.metal.menuFont=Tahoma-18^
 -Dswing.plaf.metal.systemFont=Tahoma-18^
 -Dswing.plaf.metal.smallFont=Tahoma-18^
 -cp %CP%^
 -splash:"%SQUIRREL_SQL_HOME%/icons/splash.jpg"^
 net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%

Note, that the ^ must be at the very end of the line (no spaces after it!)


Additional java switches on top of the ones given by James will help with other sections of the UI which shows small font.

-Dswing.plaf.metal.titleFont=Tahoma-18 
-Dswing.plaf.metal.menuFont=Tahoma-18 
-Dswing.plaf.metal.systemFont=Tahoma-18 
-Dswing.plaf.metal.smallFont=Tahoma-18

start.bat entry :

start "SQuirreL SQL Client" /B "%LOCAL_JAVA%" -Dsun.awt.nopixfmt=true -Dsun.java2d.noddraw=true -Dswing.plaf.metal.controlFont=Tahoma-18 -Dswing.plaf.metal.userFont=Tahoma-18 -Dswing.plaf.metal.titleFont=Tahoma-18 -Dswing.plaf.metal.menuFont=Tahoma-18 -Dswing.plaf.metal.systemFont=Tahoma-18 -Dswing.plaf.metal.smallFont=Tahoma-18 -cp %SQUIRREL_CP% -splash:"%SQUIRREL_SQL_HOME%/icons/splash.jpg" net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%

High DPI discussion on stackexchange


In the SquirreL SQL Client Version 3.7.1 you can able to increase the font size in the SQL Entry area.

Below is the procedure:

  1. Go to File --> New Session Properties

  2. Navigate to SQL Tab and then in the below you have the option called SQL Entry Area where you can increase your font size as you needed. Click here to see the screenshot


I'm assuming you're using Windows 8.1 like I am. It seems some combination of 8.1, high DPI monitors, and Swing don't play well together. My fix was to edit the squirrel-sql.bat file and add the following java options right after the existing java option

-Dswing.plaf.metal.controlFont=Tahoma-18 -Dswing.plaf.metal.userFont=Tahoma-18

For reference, the complete line is as follows:

start "SQuirreL SQL Client" /B "%LOCAL_JAVA%" -Xmx256m -Dsun.java2d.noddraw=true -Dswing.plaf.metal.controlFont=Tahoma-18 -Dswing.plaf.metal.userFont=Tahoma-18 -cp %SQUIRREL_CP% -splash:"%SQUIRREL_SQL_HOME%/icons/splash.jpg" net.sourceforge.squirrel_sql.client.Main %TMP_PARMS%

EDIT: The above will increase the size for everything except the SQL entry field. For this, go to File->New Session Properties->SQL->SQL Entry Area

Tags:

Squirrel Sql