FS#66003 - [chromium] Reading device-scale-factor from Xft.dpi or other environment variables
Attached to Project:
Arch Linux
Opened by Iran (IRunArchLinuxBTW) - Saturday, 28 March 2020, 03:09 GMT
Last edited by Evangelos Foutras (foutrelis) - Monday, 30 March 2020, 17:06 GMT
Opened by Iran (IRunArchLinuxBTW) - Saturday, 28 March 2020, 03:09 GMT
Last edited by Evangelos Foutras (foutrelis) - Monday, 30 March 2020, 17:06 GMT
|
Details
Chromium and Chromium based applications (Electron apps like
Atom, VSCode, keybase, riot) support custom DPI scale
factors, but the only way to pass them certain values is
through the `--force-device-scale-factor` command line
option. See the
[ArchWiki](https://wiki.archlinux.org/index.php/HiDPI#Chromium_/_Google_Chrome).
I asked about it on Reddit a few weeks ago. See [this
post](https://www.reddit.com/r/archlinux/comments/fcagfi/high_dpi_issue_96_dpi_is_too_small_128_dpi_is_too/).
Most other applications use X Resources's `Xft.dpi` variable: see the [ArchWiki](https://wiki.archlinux.org/index.php/HiDPI#X_Resources). On my monitor I like to use `Xft.dpi: 112`, which means `--force-device-scale-factor=1.1666`. Setting a custom DPI scale factor through the `--force-device-scale-factor` option is a pain: I have to override all the .desktop file for **every** Chromium based application and I need to remember to pass that option when running those programs via command line. Would it be possible to modify all the Chromium based app packages so that the scale factor is read from an environmental variable, an XResource variable or something else? I don't know whether it's possible to patch Chromium (and the various Electrons) for this. If it's not that easy, an option could be replace the binary files with a wrapper script that decides whether to pass the `--force-device-scale-factor. |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Monday, 30 March 2020, 17:06 GMT
Reason for closing: Won't implement
Monday, 30 March 2020, 17:06 GMT
Reason for closing: Won't implement
For Chromium-based applications with no Arch-specific custom wrapper, you can only rely on what Chromium itself does to retrieve/calculate the scale factor.
Downstream patching in order to customize the behavior of all Chromium-based applications is not feasible and/or the right thing to do.