Skip to main content

Sweet Home 3D: Solutions for text rendering and performance on Debian

Submitted by admin on Sat, 07/29/2017 - 12:03

Sweet Home 3D, an application for interior design, is using Java Swing for the UI. 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:

Awful Text Rendering

The Solution

This can be fixed by modifying /usr/share/sweethome3d/ 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 Text Rendering

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

JAVA_ARGS="-Djava.library.path=/usr/lib/jni \
 -Dswing.aatext=true \
 -Dawt.useSystemAAFontSettings=on \
 -Dsun.java2d.opengl=true \ \
 -Dcom.eteks.sweethome3d.applicationFolders=$HOME/.eteks/sweethome3d:/usr/share/sweethome3d \

. /usr/lib/java-wrappers/

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

run_java com.eteks.sweethome3d.SweetHome3D -open "$@"

Bold lines are the additions I made. with all that, it runs well and looks.. decent.