Sweet Home 3D: Solutions for text rendering and performance on Debian
Sweet Home 3D, an application for interior design, is using Java Swing for the UI. At least in my experience, Swing tends to look bad on almost every system. But, when it fails at text rendering as well, the results tend to be particularly ugly:
This can be fixed by modifying
Add these two lines to the JAVA_ARGS:
-Dswing.aatext=true \ -Dawt.useSystemAAFontSettings=on \
Save the file, start Sweet Home 3D again, and the it should look like this:
Better, but still not exactly beautiful. But in addition to that, you can also play around with -Dswing.defaultlaf= to change the look and feel of the application further.
Problems did not end there for me, when starting to place down some walls I noticed that the performance was terrible. It was a chore to use. Not even disabling 3D entirely with -Dcom.eteks.sweethome3d.no3D=true helped.
But, once I added -Dsun.java2d.opengl=true the performance was significantly better.
Here is my script file that I am using right now (on Debian 9 with KDE 5 Plasma):
#!/bin/sh # # BASEPATH=/usr/share/sweethome3d JAVA_ARGS="-Djava.library.path=/usr/lib/jni \ -Dswing.aatext=true \ -Dawt.useSystemAAFontSettings=on \ -Dsun.java2d.opengl=true \ -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel \ -Dcom.eteks.sweethome3d.applicationFolders=$HOME/.eteks/sweethome3d:/usr/share/sweethome3d \ -Dcom.eteks.sweethome3d.j3d.checkOffScreenSupport=false" . /usr/lib/java-wrappers/java-wrappers.sh find_java_runtime java6 find_jars j3dcore j3dutils vecmath batik find_jars sunflow itext janino freehep-util freehep-io freehep-xml find_jars freehep-graphics2d freehep-graphicsio freehep-graphicsio-svg find_jars /usr/share/sweethome3d/sweethome3d.jar find_jars /usr/share/icedtea-web/netx.jar cd $BASEPATH run_java com.eteks.sweethome3d.SweetHome3D -open "$@"
Bold lines are the additions I made. with all that, it runs well and looks.. decent. I suppose it doesn't get much better than that when Swing is being used.