#1111275 sweethome3d: Sweethome3D UI fonts are WAAAYYY too small.

#1111275#5
Date:
2025-08-16 11:34:19 UTC
From:
To:
    Hi !

    When using java applications such as sweethome3d on a 4K screen, the
    UI fonts are so tiny that they become unreadable. On the sweethome3d
    website FAQ (https://www.sweethome3d.com/faq.jsp) there's a section
    about "Texts in the furniture catalog are not displayed correctly or
    icons in the toolbar appear very small on my computer. How can I fix
    that?" which references a "SweetHome3D.l4j.ini"
    (https://www.sweethome3d.com/SweetHome3D-HiDPIx2.l4j.ini).

    So I updated the loader script for sweethome3d to read the
    ~/.eteks/sweethome3d/*.ini files and use their contents to
    start sweethome3d with my own fonts configuration.

    Here is the diff:
------8<------8<------8<------8<------8<------8<------8<------8<
--- sweethome3d.sh.orig 2025-08-16 10:22:45.739731243 +0200
+++ sweethome3d.sh      2025-08-16 13:22:15.693901992 +0200
@@ -1,10 +1,18 @@
 #!/bin/sh
 #
 #
+
+USER_DIR=$HOME/.eteks/sweethome3d
+USER_CFG=""
+for FILE in $(ls $USER_DIR/*.ini 2>/dev/null) ; do
+       USER_CFG="$USER_CFG $(cat $FILE)"
+done
+
 BASEPATH=/usr/share/sweethome3d
 JAVA_ARGS="-Djava.library.path=/usr/lib/jni \
  -Dcom.eteks.sweethome3d.applicationFolders=$HOME/.eteks/sweethome3d:/usr/share/sweethome3d \
  -Dcom.eteks.sweethome3d.j3d.checkOffScreenSupport=false \
+ $USER_CFG
  -Dsun.java2d.opengl=true --add-exports java.desktop/sun.awt=ALL-UNNAMED"

 . /usr/lib/java-wrappers/java-wrappers.sh
------8<------8<------8<------8<------8<------8<------8<------8<


    My own configuration file :
------8<------8<------8<------8<------8<------8<------8<------8< -Dcom.eteks.sweethome3d.resolutionScale=2 -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Dswing.plaf.metal.controlFont=Dialog-9 -Dswing.plaf.metal.userFont=SansSerif-9 -Dswing.plaf.metal.systemFont=SansSerif-9 ------8<------8<------8<------8<------8<------8<------8<------8< Note that I can't make it use another Look&Feel and I don't know why (maybe I don't know how to).