HiDPI and fonts

This commit is contained in:
2021-05-16 12:43:18 +01:00
parent eaa1f41744
commit 63b0af4617
11 changed files with 32 additions and 18 deletions

8
.local/bin/setup/setupmaptool Executable file
View File

@@ -0,0 +1,8 @@
#! /bin/bash
# Scale up the GUI by 2 times for HiDPI screens
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/.DPI" ]; then
DPI="$(cat "${XDG_CONFIG_HOME:-$HOME/.config}/x11/.DPI")"
SCALE="$(((DPI+48)/96))"
sudo -A sed -i "/\[JavaOptions\]/a -Dsun.java2d.uiScale=$SCALE" /opt/maptool/lib/app/MapTool.cfg
fi