Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xinit/dist Explanations requested by uwe...



details:   https://anonhg.NetBSD.org/xsrc/rev/3ea590852055
branches:  trunk
changeset: 6985:3ea590852055
user:      nia <nia%NetBSD.org@localhost>
date:      Sun May 29 05:53:02 2022 +0000

description:
Explanations requested by uwe...

diffstat:

 external/mit/xdm/dist/config/Xsession.in |  14 +++++++++++++-
 external/mit/xinit/dist/xinitrc.cpp      |  14 +++++++++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diffs (69 lines):

diff -r 7f2386cfb80d -r 3ea590852055 external/mit/xdm/dist/config/Xsession.in
--- a/external/mit/xdm/dist/config/Xsession.in  Fri May 27 19:05:28 2022 +0000
+++ b/external/mit/xdm/dist/config/Xsession.in  Sun May 29 05:53:02 2022 +0000
@@ -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 @@
 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
diff -r 7f2386cfb80d -r 3ea590852055 external/mit/xinit/dist/xinitrc.cpp
--- a/external/mit/xinit/dist/xinitrc.cpp       Fri May 27 19:05:28 2022 +0000
+++ b/external/mit/xinit/dist/xinitrc.cpp       Sun May 29 05:53:02 2022 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index