dumol / PixelPerfect

Pixel-perfect font rendering under Wayland and X.org
MIT License
17 stars 1 forks source link

High DPI setup. #10

Open dumol opened 11 months ago

dumol commented 11 months ago

This adds a PixelPerfect FontConfig setup geared towards high DPI displays such as modern laptops, tablets, and smartphones.

If you are using a low DPI device (less than 120 dpi) stick to the master branch for now, as more configuring is needed to test this branch in such a scenario. (Improvements are coming your way too, be patient.)

How to test:

  1. Make sure you move aside whatever you have in ~/.config/fontconfig and ~/.local/share/fonts (These do not exist by default in any OS that I know.)
  2. Download and unpack in $HOME the PixelPerfect-hidpi-0.4beta2.tar.gz released archive:
    cd ~
    curl -LO https://github.com/dumol/PixelPerfect/releases/download/v0.4.0beta2/PixelPerfect-hidpi-0.4beta2.tar.gz
    tar xvfz PixelPerfect-hidpi-0.4beta2.tar.gz
  3. If using a desktop environment, configure your device to use System-ui or Asap for the interface text and ui-monospace or Cascadia Code PL SemiLight for monospace text (these should be identical). E.g., for GNOME, use the commands added to the README through 06bfc73e. (You can use ui-monospace for the second command, but beware the monospace option won't show up properly in the GNOME Tweaks app.)
  4. Log out and in again to fully propagate the changed settings.
  5. If you use Flatpak and/or Snap apps, run the instructions added to the README through 06bfc73e.
  6. If you use Sailfish OS, you should also change theme_pixel_ratio to 1.5 (it's usually 1.75) to take advantage of the improved Fontconfig setup, as detailed at https://forum.sailfishos.org/t/ui-themer-missing-from-openrepos/2457/89. Then you can also set Asap as UI font (falling back to Roboto and Arimo) in ~/.config/fontconfig/os/sfos.conf instead of Barlow and its fallbacks. Also, in Settings->Display->Text Size, "normal" is now actually "small", and you have to set "large" to get "normal" text sizes. The only known downside to this change of theme pixel ratio: the “diallers” in the Phone app and the locked screens looking a bit more cramped than they should.

Check out https://reeddesign.co.uk/test/webfonts.html to see the improvements. Many other web pages should benefit from this setup, including GitHub's web interface here. You can even disable loading remote fonts in your browser, but please report any sites not looking good afterwards.

Do let me know your thoughts on this, thanks!

Instead of step 2, you can also do this: