2 Commits
Author SHA1 Message Date
Devin J. Pohly a96c303174 Fix font scaling on rotated outputs
When an output is rotated with xrandr, the command-line utility prints
the pixel dimensions of the display as rotated, but the physical
dimensions of the display without rotation.  As a result, when the
rotation is "left" or "right", they didn't match each other, and the
wrong scale was calculated.  Check explicitly for this.
2018-07-26 15:53:03 -05:00
Devin J. Pohly e9c6cbafc1 automatically scale fonts based on monitor DPI
Each time the urxvt window is moved, check to see if the window is now
on a monitor with a different DPI.  If so, calculate and set a new font
size so that the physical size of the text is unchanged.  Works great
for laptops with HiDPI displays and external monitors; may require some
tweaking for other scenarios (e.g. laptop + presentation projector).

Scaling can be disabled by setting ENABLE_DPI_SCALING to 0 in the
extension source.

Note: This feature requires the xrandr command-line tool to be
installed.
2018-06-23 13:08:47 -05:00