font size of Squirrel SQL too small

19,350

Solution 1

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

Solution 2

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

Solution 3

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

Solution 4

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!)

Solution 5

In the SquirreL SQL Client Version 3.9.0: enter image description here

Share:
19,350

Related videos on Youtube

Rudy Vissers
Author by

Rudy Vissers

"Hello, World!" I am a freelance/self-employed developer. I live in Belgium (50 km south of Brussels). I focus on the Java ecosystem. https://github.com/houdini68/testing-java

Updated on June 11, 2022

Comments

  • Rudy Vissers
    Rudy Vissers almost 2 years

    The size of the font to enter the SQL is too small. What is the way to increase the size of the font to type the SQL ? In 'global options' there is a possibility to increase the size of the fonts. But this has no impact on the size of the text to enter the SQL.

    • lc.
      lc. over 8 years
      Not sure why this was downvoted. It looks like a perfectly valid question to me, although I'm not familiar with the tool.
    • Alan McGill
      Alan McGill about 7 years
      The first answer above (Muhammad Usman's answer) worked for me but after making the changes in the New Session Properties I had to save my changes: File -> Save Preferences Then close and restart SQuirreL. You have to go to File -> Save Preferences pretty much any time you make any change to the settings/setup in SQuirreL.
  • Rudy Vissers
    Rudy Vissers over 8 years
    I use a Windows 7 Enterprise 64 bits. It is on on a laptop not really high dpi:1600x900. I will pass the 2 parameters to the jre and report if it solved the problem. Thanks.
  • Rudy Vissers
    Rudy Vissers over 8 years
    Sorry, the 2 parameters, didn't solved the problem. Everything that is displayed by the Squirrel use very big fonts (as it was configured) but the window to type the SQL uses a font that is too small (and it seems not configurable). I should look into the code.
  • James Freeman
    James Freeman over 8 years
    Rudy, please let me know if you figure that part out. I've pulled down the git repo but haven't been able to figure out a way to increase the size of the SQL editor yet.
  • Harish
    Harish over 7 years
    I'm using Mac OS X. I added following lines to my squirrel-sql.sh file. "-Dsun.java2d.noddraw=true -Dswing.plaf.metal.controlFont=Tahoma-18 -Dswing.plaf.metal.userFont=Tahoma-18". It didn't work in my mac.
  • Rudy Vissers
    Rudy Vissers about 7 years
    I have just done a test. It is not needed to restart Squirrel to change the font size. The answer is accepted.
  • Tom
    Tom over 6 years
    Good workaround made the app usable for me, but icons are still very small
  • sfali16
    sfali16 over 6 years
    Modifying the squirrel-sql.bat with the two font options provided by @James Freeman worked partially and fixed most of the issues for me. But the query editor still had tiny fonts, and I had to manually go into UI, File > New Session Properties > SQL tab, in the SQL Entry Area, click the Font button. Set font to Tahoma and font size to 18 (you will have to manually type in 18 as it's not available in the dropdown).
  • mathisfun
    mathisfun about 6 years
    +1 I had been editing the session properties every time I made a new session. Thanks for saving me the annoyance.
  • Ashu
    Ashu over 5 years
    Not working for me. I have Dell XPS 9560 - 4K and the higher resolution is making the fonts too small.
  • philippeback
    philippeback about 5 years
    Was looking for this. Thx!