Module Name: xsrc Committed By: nia Date: Sun May 29 05:53:02 UTC 2022
Modified Files: xsrc/external/mit/xdm/dist/config: Xsession.in xsrc/external/mit/xinit/dist: xinitrc.cpp Log Message: Explanations requested by uwe... To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 xsrc/external/mit/xdm/dist/config/Xsession.in cvs rdiff -u -r1.19 -r1.20 xsrc/external/mit/xinit/dist/xinitrc.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xdm/dist/config/Xsession.in diff -u xsrc/external/mit/xdm/dist/config/Xsession.in:1.17 xsrc/external/mit/xdm/dist/config/Xsession.in:1.18 --- xsrc/external/mit/xdm/dist/config/Xsession.in:1.17 Fri May 27 19:05:28 2022 +++ xsrc/external/mit/xdm/dist/config/Xsession.in Sun May 29 05:53:02 2022 @@ -1,6 +1,6 @@ XCOMM!SHELL_CMD XCOMM -XHASH $NetBSD: Xsession.in,v 1.17 2022/05/27 19:05:28 nia Exp $ +XHASH $NetBSD: Xsession.in,v 1.18 2022/05/29 05:53:02 nia Exp $ XCOMM redirect errors to a file in user's home directory if we can @@ -93,11 +93,23 @@ Xmessage*font: -*-spleen-medium-r-*-*-$ Xmh*font: -*-spleen-medium-r-*-*-$fontsize-*-*-*-*-*-*-* EOF if [ $fontsize -gt 18 ]; then +# +# For HiDPI displays, the font size returned by ctwm_font_size will +# generally be a multiple of 16. 96 is our standard DPI, and many +# applications want to scale by integer increments or don't handle +# non-integer scaling gracefully, so we want to scale by multiples +# of 96. +# BINDIR/xrdb -merge - <<EOF Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin) *VT100.faceName: xft:Monospace:pixelsize=$fontsize EOF elif [ $fontsize -gt 13 ]; then +# +# For non-HiDPI cases, use the standard misc-fixed font in xterm +# since it has bold variants, and seems to have caused fewer +# complaints than alternatives in the community so far. +# BINDIR/xrdb -merge - <<EOF *VT100.font: -misc-fixed-medium-r-normal-*-18-*-*-*-*-*-iso10646-1 *VT100.fontBold: -misc-fixed-bold-r-normal-*-18-*-*-*-*-*-iso10646-1 Index: xsrc/external/mit/xinit/dist/xinitrc.cpp diff -u xsrc/external/mit/xinit/dist/xinitrc.cpp:1.19 xsrc/external/mit/xinit/dist/xinitrc.cpp:1.20 --- xsrc/external/mit/xinit/dist/xinitrc.cpp:1.19 Fri May 27 19:05:28 2022 +++ xsrc/external/mit/xinit/dist/xinitrc.cpp Sun May 29 05:53:02 2022 @@ -1,5 +1,5 @@ XCOMM!SHELL_CMD -XHASH $NetBSD: xinitrc.cpp,v 1.19 2022/05/27 19:05:28 nia Exp $ +XHASH $NetBSD: xinitrc.cpp,v 1.20 2022/05/29 05:53:02 nia Exp $ userresources=$HOME/.Xresources usermodmap=$HOME/.Xmodmap @@ -64,11 +64,23 @@ Xmessage*font: -*-spleen-medium-r-*-*-$ Xmh*font: -*-spleen-medium-r-*-*-$fontsize-*-*-*-*-*-*-* EOF if [ $fontsize -gt 18 ]; then +# +# For HiDPI displays, the font size returned by ctwm_font_size will +# generally be a multiple of 16. 96 is our standard DPI, and many +# applications want to scale by integer increments or don't handle +# non-integer scaling gracefully, so we want to scale by multiples +# of 96. +# XRDB -merge - <<EOF Xft.dpi: $(/usr/bin/printf '96 * (%d / 16)\n' "$fontsize" | /usr/bin/bc /dev/stdin) *VT100.faceName: xft:Monospace:pixelsize=$fontsize EOF elif [ $fontsize -gt 13 ]; then +# +# For non-HiDPI cases, use the standard misc-fixed font in xterm +# since it has bold variants, and seems to have caused fewer +# complaints than alternatives in the community so far. +# XRDB -merge - <<EOF *VT100.font: -misc-fixed-medium-r-normal-*-18-*-*-*-*-*-iso10646-1 *VT100.fontBold: -misc-fixed-bold-r-normal-*-18-*-*-*-*-*-iso10646-1