fonts: size fonts using the scaling factor when output scaling is enabled

This extends the new ‘dpi-aware’ option with a new default value,
‘auto’.

When set to ‘auto’, fonts are sized using monitors’ DPI when output
scaling is disabled. When output scaling is enabled, fonts are instead
sized using the scaling factor.

The reasoning here is that a user that has enabled output scaling is
obviously *not* relying on DPI scaling.

Output scaling can also be a way to compensate for different viewing
distances, in which case we do *not* want to break that by using DPI
scaling.

Users can still force DPI-only font sizing by setting ‘dpi-aware=yes’,
or disable it completely by setting ‘dpi-aware=no’.
This commit is contained in:
Daniel Eklöf 2020-12-17 12:05:22 +01:00
parent 69cd5fd3ab
commit 0a821f2ed4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 78 additions and 35 deletions

View file

@ -78,10 +78,13 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See
* **bold-text-in-bright** option to `foot.ini`. When enabled, bold
text is rendered in a brighter color
(https://codeberg.org/dnkl/foot/issues/199).
* **dpi-aware** option to `foot.ini`. The default, **enabled**,
implements foot's old font sizing behavior. But, when **disabled**,
foot will ignore the monitors' DPI and instead size fonts using the
scale factor alone (https://codeberg.org/dnkl/foot/issues/206).
* **dpi-aware** option to `foot.ini`. The default, `auto`, sizes fonts
using the monitors DPI when output scaling has been
**disabled**. If output scaling has been **enabled**, fonts are
sized using the scaling factor. DPI-only font sizing can be forced
by setting `dpi-aware=yes`. Setting `dpi-aware=no` forces font
sizing to be based on the scaling factor.
(https://codeberg.org/dnkl/foot/issues/206).
* `-w,--window-size-pixels` and `-W,--window-size-chars` command line
options to `footclient` (https://codeberg.org/dnkl/foot/issues/189).
* Short command line options for `--title`, `--maximized`,