Mar*_*ing 3 12.04 display-rotation
我有一台带有 Kubuntu 12.04 的新 ThinkPad X220 平板电脑。当我用脚本将屏幕旋转 90° 时,旋转后打开的所有程序的字体都有丑陋的巨大字体。
#!/bin/sh
# Find the line in "xrandr -q --verbose" output that contains current screen orientation and "strip" out current orientation.
rotation="$(xrandr -q --verbose | grep 'connected' | egrep -o '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')"
# Using current screen orientation proceed to rotate screen and input tools.
case "$rotation" in
normal)
# rotate to the left
xrandr -o right
xsetwacom set "Wacom ISDv4 E6 Pen stylus" rotate cw
xsetwacom set "Wacom ISDv4 E6 Finger touch" rotate cw
xsetwacom set "Wacom ISDv4 E6 Pen eraser" rotate cw
;;
right)
# rotate to normal
xrandr -o normal
xsetwacom set "Wacom ISDv4 E6 Pen stylus" rotate none
xsetwacom set "Wacom ISDv4 E6 Finger touch" rotate none
xsetwacom set "Wacom ISDv4 E6 Pen eraser" rotate none
;;
esac
Run Code Online (Sandbox Code Playgroud)
将评论转换为答案
您的问题似乎与这个旧的 KDE bug-report密切相关/或相同。
在重复链接之后,它提到了一个可能的解决方法
该问题的可能解决方法:
系统设置 -> 外观 -> 字体强制 dpi 为 96
查看xrandr的手册页,您可能可以尝试:
xrandr --dpi [dpi]
Run Code Online (Sandbox Code Playgroud)
或者可能在您的脚本中调用xrandr
两次,将 更改[dpi]
为一个值,休眠一秒钟以允许显示刷新,然后再次使用最终[dpi]
值调用相同的例程- 例如,96
.