summaryrefslogtreecommitdiffstats
path: root/starttde
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2021-10-04 17:04:23 +0900
committerMichele Calgaro <[email protected]>2021-10-07 10:30:28 +0900
commite8d86645043847265b61825c9a1f20a6b93cc924 (patch)
tree36d0de030110787276cc4273758e671268104145 /starttde
parent6d39ea6ae8fffaa9419131d1b70f4d78f55bea44 (diff)
downloadtdebase-e8d86645043847265b61825c9a1f20a6b93cc924.tar.gz
tdebase-e8d86645043847265b61825c9a1f20a6b93cc924.zip
Added support for variable font DPI (range 64-512) in user session.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'starttde')
-rwxr-xr-xstarttde18
1 files changed, 10 insertions, 8 deletions
diff --git a/starttde b/starttde
index 899bdfa9c..88e1bdaff 100755
--- a/starttde
+++ b/starttde
@@ -377,6 +377,7 @@ kcmrandrrc [Screen0]
kcmrandrrc [Screen1]
kcmrandrrc [Screen2]
kcmrandrrc [Screen3]
+kcmfonts General forceFontDPIEnable false
kcmfonts General forceFontDPI 0
EOF
$TDEDIR/bin/tdestartupconfig
@@ -474,14 +475,15 @@ if test -z "$dl" && test "$kpersonalizerrc_general_firstlogin" != "true"; then
esac
fi
-if test "$kcmfonts_general_forcefontdpi" -eq 120; then
- xrdb -quiet -merge -nocpp <<EOF
-Xft.dpi: 120
-EOF
-elif test "$kcmfonts_general_forcefontdpi" -eq 96; then
- xrdb -quiet -merge -nocpp <<EOF
-Xft.dpi: 96
-EOF
+if test "$kcmfonts_general_forcefontdpienable" = "true"; then
+ echo "[starttde] Setting font DPI to $kcmfonts_general_forcefontdpi" 1>&2
+ tmpfile=$(mktemp /tmp/xft_dpi_settings.XXXXXX)
+ echo "Xft.dpi: $kcmfonts_general_forcefontdpi" > $tmpfile
+ xrdb -quiet -merge -nocpp $tmpfile
+ rm $tmpfile
+else
+ echo "[starttde] Clearing setting of font DPI value" 1>&2
+ xrdb -quiet -remove -nocpp Xft.dpi
fi
# Configuration of the gtk_qt_engine if not already set.