#276 Anti-aliased Text in SQL window

Rob Manning
Anthony Keeley

This is by no means a "must-have", but it would be nice to have anti-aliased text on the editor portion of the SQL tab. Right now, the netbeans editor doesn't seem to support it. I've gotten used to it in my other apps and without it, its a little rough on the eyes :)


  • mazy

    I would like this too. The GUI is anti-aliased (WinXP here), but not text in the SQL editor. I've tried to add some JVM parameters to the startup batch file with no effect whatsoever.

    NetBeans editor is supposed to support anti-aliasing though.

  • Version 3 looks awesome, but is still missing this feature. Any progress here?

  • Lari Hotari
    Lari Hotari

    Fonts look awful in the SQL Entry Area without anti-aliasing (at least in Ubuntu).

    It's possible to use the default anti-aliasing settings by overriding the paintComponent method:

    protected void paintComponent ( Graphics g )
    Graphics2D g2d = (Graphics2D)g;
    Map desktopHints = (Map)(Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints"));
    if(desktopHints != null) {
    super.paintComponent( g2d );

    This will use the desktop's default antialiasing settings , use -Dawt.useSystemAAFontSettings=on (off|lcd) to override defaults (documentation: http://java.sun.com/javase/6/docs/technotes/guides/2d/flags.html#aaFonts\).

    This works for Netbeans syntax editor (sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/NetbeansSQLEditorPane.java) and it should work for others too (any Swing JComponent).

    For the RSyntaxTextArea (sql12/pluginssyntax/src/net/sourceforge/squirrel_sql/plugins/syntax/rsyntax/SquirrelRSyntaxTextArea.java) adding this line to the constructor enabled anti-aliasing:
    Overriding paintComponent should work too.

    It might be good to have a setting for enabling / disabling anti-aliasing settings for the syntax editor. Some users might prefer the legacy behaviour.

  • Student


    I am not Java developer, but very much missing this feature! What can be done to fix it ASAP?

    Or at least can anybody build syntax plugin with this VALUE_TEXT_ANTIALIAS_ON and publish somewhere fixed plugin files?

    Thank you!

  • Victor Ramirez
    Victor Ramirez

    Workaround for linux: install Liberation Mono v1.x and use that as your editor font. The font renders well without antialiasing and is great for code as it distiguishes between uppercase O and zero.