How did you make your font rendering less ... all over the place?

Is there any way to make fonts and text a bit more cohesive?

Some letters get squeezed real tight together, other have a bunch of space in between for no reason.

Found this article, explaining the issue as a whole. Is there nothing that can be done about it, as things currently stand, after all? And no one really seems to care? As it’s quite troublesome, irritating and fairly confusing to read through - especially coming from Windows and Mac devices.

I am aware of Manjaro’s article on the subject - yet it appears to be dealing mostly with “infinality” mode, which was abandoned by its developer and later incorporated into the whole FreeType project.

And it doesn’t help with the spacing mismatch at all.

Anyone found a solution to this yet?

See this issue i opened Font rendering enhancement on the Welcome screen description (#35) · Issues · Applications / manjaro-hello · GitLab

Looks like it was a bit too early to set that as solved.

Fonts don’t work as expected - with hinting enabled, letters get pushed around for no reason, exactly the same way the article of the previously mentioned articled mentioned:

Without any hinting, everything is in place - yet it feels blurry, it’s hard and painful to look at, and it puts so much strain on the eyes that I can physically feel them getting tense in my skull. Working for more than 15 minutes in front of such a device of pain and fuzziness is just plain impossible.

I just don’t get it. What’s missing? Why is working with fonts in Linux such a horrific PITA?

Windows #1

Linux #1

/

Windows #2

Linux #2

/

Windows #3

Linux #3

/

Gmail on Windows

Gmail on Linux

Screenshot_20220825_181951

Why the fuzziness? The bleakness?

Is there an alternative to a Windows Clear Type tuner? Is it my hardware? NVIDIA Drivers? Intel’s PWM?

See if this helps:
put the following line in your
/etc/environment file

PLASMA_USE_QT_SCALING=1

Well, you initial issue was about Manjaro Hello, and i did agree with your observations, hence i opened an issue with what i thought would be fit to solve the Manjaro hello description font issue …

What you present now is simply put, Linux font rendering problem … To be honest, all screenshots you shared (from Windows or Linux) all look blurred on my end, so is hard to get to a conclusion.

We could start by investigating it. Share:
inxi -Fazy
Or share it according to this fine [HowTo] Receive better support

1 Like

And I’m grateful for that - it was the first thing I saw when I logged into the installed system, and I couldn’t really imagine that it would be a persistent thing across all applications.

Using a Ubuntu Live USB right now. The difference is night and day. Even email can be written without a horrible strain on the eyes:

image

A bit more Googling made me stumble upon this bit here.

In particular, this was somewhat surprising:

Ubuntu (Gnome) uses PANGO for font render engine. Which is one of the best font engine. I don’t know about KDE/QT. Another thing, KDE does not allow us to set fractional value for font size like 10.5pt. 10.5pt is a standard side for 96dpi monitor. All font gets proper height and weight with 10.5pt in Gnome. But in KDE there’s no 10.5pt. You have to select 10pt or 11pt. Which makes no sense.

Is that really the case? Does KDE relying on FreeType, as opposed to Pango, could make this much difference? I really love the customizability of KDE, but if I have to sacrifice my eye sight for it - there’s no way I’m keeping it there. Probably giving a go to Manjaro GNOME could work a bit better, then.

Ubuntu doesn’t have it preinstalled, and I can’t find it in apt - still, most likely it has nothing to do with the system and the drivers, and everything to do with the actual rendering engine.

After carefully zooming in into the text on KDE, I noticed the FreeType (as opposite to Ubuntu’s / Windows’ engine) prioritizes perfect font scaling, instead of readability. The fonts actually look perfect, at least with a default grayscale antialiasing and no/little hinting. The problem is that fonts that are perfectly scaled down are incredibly difficult to read. If there’s no sacrifice made in this regard for the sake of readability, the issue will persist - likely forever. Not sure where to start solving this, though.

Wasn’t quite planning to rewrite any rendering engine - let alone one that the whole OS depends on - when I started looking into switching to Linux and Manjaro in particular. I’m a tinkerer for sure, but I’ve also got a bunch of business to take care of besides my beloved distro of choice in the moment.

And the same thing is most likely true for most people considering switching as well. :man_shrugging:

On my side I don’t notice such issues in my KDE installation. When I check the settings I disabled the sub-pixel thing in System Settings, I think it was on my previous monitor I noticed it was making text better, and I kept this setting like that to this day.

Can you make a screenshot of this page so I have something to compare to?

Sure thing - switching between 3 different kernels is getting a bit tiresome, but still.

From the sharpest / most readable / less eye-straining towards the blurriest and the most painful:

Windows

Ubuntu

Manjaro

The weird thing is that from afar Manjaro looks the best. It seems to nail all the individual font details, all the curves, all the shapes, and smooth them out as necessary. From nearby, however, it remains the most straining and uncomfortable rendering to work with. I can’t even pinpoint why exactly it is the case.

Zooming in (400%):

Windows

Ubuntu

Manjaro

Manjaro gives off an “RGB-sque” kind of vibe even in grayscale mode. Yet close up they look exactly the same. There might be an issue with the Intel PWM thing. Or drivers. Some people in the eye strain thread have pointed out that using prop NVidia firmware seemed to create more issues for them than help them.

Never had a reason to wish I’d own a slightly more outdated laptop with AMD drivers before now.

Guess posting a bit more about my system could help. Rebooting again from W10 into MJ.

All right then. I have no clue what I’ve done, but things seem to feel a whole more natural now.

Resources that got me where I am right now:

https://superuser.com/questions/707477/laptop-screen-causes-eye-strain-on-all-linux-distros-except-ubuntu-and-elementar

https://127001.me/post/eliminate-backlight-flicker-with-i915/#_footnote_1

Slightly changed the script to make it “read-only”:

.sh
#!/usr/bin/env bash

function usage() {
  cat << EOF
intelpwm FREQ [PCH_RAWCLK_FREQ_REG [BLC_PWM_PCH_CTL2_REG]]

  FREQ                  desired PWM frequency in Hz
  PCH_RAWCLK_FREQ_REG   PCH raw clock register name or offset
  BLC_PWM_PCH_CTL2_REG  backlight control register name or offset
EOF
}

function reg_check() {
  # If the register is a mnemonic name and not an offset, make sure that it is
  # known to intel_reg utility. Unknown mnemonic likely means, that we are on a
  # different generation of hardware that may have different registers layout
  printf "%d" "$1" 1>/dev/null 2>&1  || \
    intel_reg list | grep "$1" 1>/dev/null 2>&1 || \
      (>&2 echo "Register $1 is not defined on this hardware" && false)
}

function reg_read() {
  # this assumes fixed position of the value in intel_reg output
  # so far this has been the case though
  intel_reg  read "$1" | cut -c51-60
}

FREQ=$1
PCH_RAWCLK_FREQ_REG=$2        # ${2:-PCH_RAWCLK_FREQ}
BLC_PWM_PCH_CTL2_REG=$3       # ${3:-BLC_PWM_PCH_CTL2}

if [ -z "$FREQ" ]; then
  usage
  exit 1
fi

reg_check "${PCH_RAWCLK_FREQ_REG}" || exit 1
reg_check "${BLC_PWM_PCH_CTL2_REG}" || exit 1

PCH_FREQ="$(reg_read ${PCH_RAWCLK_FREQ_REG})"
BLC_CTL2="$(reg_read ${BLC_PWM_PCH_CTL2_REG})"
CYCLE="${BLC_CTL2:6:4}"
HEX=$(printf "0x%08x" $((1000000*PCH_FREQ/128/FREQ)))
PERIOD="${HEX:6:9}"

>&2 echo "To write 0x${PERIOD}${CYCLE} to register ${BLC_PWM_PCH_CTL2_REG} execute "
echo "intel_reg write ${BLC_PWM_PCH_CTL2_REG} x${PERIOD}${CYCLE}"

It recommended me to change the register (whatever that is) from the original 0x0001be6d to 0x6000be6d, 0x4000be6d, 0x1000be6d - you get the idea. Turns out the only acceptable options, besides the full brightness at 0x0001be6d is 0x0002, 0x0003, etc - and if you try to switch back from 5 to 1, screen simply shuts down completely. I have no clue what’s actually going on, but with 75% bright 2 things are a bit easier.

Actually, I’m going back to 0x0001. It’s more of a 66% brightness. And it doesn’t seem to be connected to the frequency in any way whatsoever. Perhaps on my system those bytes stand for brightness, not PWM.

The search continues. Manjaro Gnome is next.

Oh, and the actual system info is:

inxi -Fazy
System:
  Kernel: 5.15.60-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=517074cb-2588-4701-8ee4-51266660a321 rw quiet
    resume=UUID=f7469a99-b2e1-4d76-9184-f003f83726dc udev.log_priority=3
  Desktop: KDE Plasma v: 5.24.6 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: Strix 17 GL703GE v: 1.0
    serial: <superuser required>
  Mobo: ASUSTeK model: GL703GE v: 1.0 serial: <superuser required>
    UEFI: American Megatrends v: GL703GE.320 date: 06/19/2020
Battery:
  ID-1: BAT1 charge: 47.4 Wh (100.0%) condition: 47.4/64.4 Wh (73.6%)
    volts: 5.2 min: 15.2 model: ASUS A32-K55 type: Li-ion serial: N/A
    status: full
CPU:
  Info: model: Intel Core i5-8300H bits: 64 type: MT MCP arch: Coffee Lake
    gen: core 8 level: v3 built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xF0
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 983 high: 1532 min/max: 800/4000 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1532 2: 935 3: 900 4: 900
    5: 900 6: 900 7: 900 8: 900 bogomips: 36812
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl and seccomp
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK
    driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
    ports: active: HDMI-A-1,eDP-1 empty: DP-1,HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:3e9b class-ID: 0300
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] vendor: ASUSTeK
    driver: nvidia v: 515.65.01 alternate: nouveau,nvidia_drm non-free: 515.xx+
    status: current (as of 2022-08) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-21 pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.0 chip-ID: 10de:1c8c
    class-ID: 0302
  Device-3: Logitech Webcam C310 type: USB driver: snd-usb-audio,uvcvideo
    bus-ID: 1-1:2 chip-ID: 046d:081b class-ID: 0102 serial: <filter>
  Device-4: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo
    bus-ID: 1-7:4 chip-ID: 13d3:5666 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.4 compositor: kwin_x11 driver: X:
    loaded: modesetting,nvidia alternate: fbdev,nouveau,nv,vesa gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x285mm (40.00x11.22")
    s-diag: 1055mm (41.54")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 pos: right model: Samsung SMEX2220
    serial: <filter> built: 2010 res: 1920x1080 hz: 60 dpi: 102 gamma: 1.2
    size: 477x268mm (18.78x10.55") diag: 547mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  Monitor-2: eDP-1 pos: primary,left model: ChiMei InnoLux 0x1747
    built: 2016 res: 1920x1080 hz: 120 dpi: 128 gamma: 1.2
    size: 381x214mm (15x8.43") diag: 437mm (17.2") ratio: 16:9
    modes: 1920x1080
  OpenGL: renderer: Mesa Intel UHD Graphics 630 (CFL GT2) v: 4.6 Mesa 22.1.6
    direct render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel
    v: kernel bus-ID: 1-1:2 chip-ID: 046d:081b
    alternate: snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
    class-ID: 0102 serial: <filter> chip-ID: 8086:a348 class-ID: 0403
  Device-2: Logitech Webcam C310 type: USB driver: snd-usb-audio,uvcvideo
  Sound Server-1: ALSA v: k5.15.60-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.56 running: no
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
  IF: wlo1 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: ASUSTeK driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 1-14:6 chip-ID: 8087:0aaa class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 1.04 TiB used: 713.95 GiB (67.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Kingston
    model: RBUSNS8154P3128GJ size: 119.24 GiB block-size: physical: 512 B
    logical: 512 B speed: 15.8 Gb/s lanes: 2 type: SSD serial: <filter>
    rev: E8FK11.C temp: 58.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LX015-1U7172
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 5400 serial: <filter> rev: SDM1 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 type: USB vendor: Generic model: Flash Disk
    size: 14.65 GiB block-size: physical: 512 B logical: 512 B type: SSD
    serial: <filter> rev: 8.07 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 50 GiB size: 48.91 GiB (97.83%) used: 12.09 GiB (24.7%)
    fs: ext4 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: /boot/efi raw-size: 326 MiB size: 325.3 MiB (99.79%) used: 316 KiB
    (0.1%) fs: vfat dev: /dev/nvme0n1p4 maj-min: 259:4
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 3.51 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p1 maj-min: 259:1
Sensors:
  System Temperatures: cpu: 55.0 C pch: 60.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 0
Info:
  Processes: 259 Uptime: 18m wakeups: 1 Memory: 15.48 GiB used: 3.27 GiB
  (21.1%) Init: systemd v: 251 default: graphical tool: systemctl Compilers:
  gcc: 12.1.1 clang: 14.0.6 Packages: pm: pacman pkgs: 1071 libs: 300
  tools: pamac Shell: Zsh v: 5.9 default: Bash v: 5.1.16 running-in: konsole
  inxi: 3.3.21

i don’t wonder anymore, using all your displays on a intel-uhd is a mess. this internal gpu isn’t capable. use your nvidia as permanent-primary-gpu instead and your good.

I didn’t reply yet because I was trying to figure out what was really wrong, what I was not seeing and so on. To this day I can’t really say I see what the issue is with font. Maybe I could feel font rendering different between Windows and Linux OS, but I can’t do proper comparison.

your problem is using the limited intel-graphics and missing, not installed fonts.

Lenovo x1 carbon 9th generation. Tried fiddling with pwm using arch’s intelpwm tool. Scary - no --help option when running intelpwm and immediately left a computer with no back light control and regularly switching between backlight OFF and ON 100%. Luckily, destroying the file /etc/intelpwm.conf returned my computer to its old state. Should have done more homework I guess.

Well, I have an intel gfx on my laptop and I don’t see those issues. Using KDE with font rendering with subpixel slight hinting.

@igor are you sure your problems don’t occur only on GTK applications? For GTK I use the file ~/.Xresources (which also affect KDE apps, although I do have options selected in system settings (except dpi).

[mbb@mbb-laptop ~]$ cat .Xresources 
#if __has_include(".extend.Xresources")
#include ".extend.Xresources"
#endif

! ^ The above lines are no comments!
! Leave them as they are if a file ~/.extend.Xresources is being used on your system.
! config can be added there or also here below.
! For comments use "!"

!Xft.dpi: 112.6
Xft.dpi: 113
Xft.antialias: true
Xft.autohint: false
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault

!XTerm*background: #2b2b2b
!XTerm*foreground: #e7e7e7
!XTerm*pointerColor: #16A085
!XTerm*faceName: Fixed
!XTerm*faceSize: 11

And in top of this, I still have the file ~/.config/fontconfig/fonts.conf

[mbb@mbb-laptop ~]$ cat .config/fontconfig/fonts.conf 
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <dir>~/.fonts</dir>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
</fontconfig>

You, and I, probably don’t need all this superposition of settings, but you can always try one at the time and see if any one suits you.

Regarding KDE not having font half sizes to select, you can type 10.5 or whatever and the font will be sized accordingly.

I honestly don’t know what to tell you guys - the fonts just feel “off”. There’s an ever-subtle fuzziness, blurriness, and smoothing that is nearly imperceptible to the naked eye. Nothing feels wrong right away, yet after half an hour in front of the laptop my eyes begin to hurt and I get a headache. W10 doesn’t give me such a problem. Nor did Mac, the last time I was using it in the customer support office I was working in.

Thinking it was all a trick in “magic” factory settings, I even installed Kubuntu on my machine. Manjaro refused to boot, always getting stuck at the black screen, saying something about the hard drive and it being full to 588515 / 49919931 or something. First 15-30 minutes are fine. Afterwards - it’s a literal headache.

I don’t want to ruin my eyesight just for the sake of open source. Not sure if it’s about my laptop, Intel GPU graphics, NVidia drivers giving issues, or me being so used to the crisp, clean fonts of W - but I can’t do it.

Might grab one of them “Ubuntu”-certified laptops by Dell or System76 in the future. Perhaps with the right machine, things aren’t going to be that bad. But as it currently stands - it’s just impossible.

I’m not the only one bringing up this issue, and it definitely seems to have quite little to do with a particular distro and much more to do with the overall open source libraries being used to tackle font rendering.

Even when in-browser and regular interface fonts look decent, editing any plain office document - in OnlyOffice or equivalent - is just an eye sore. Jumbled letters, jagged edges, misplaced letters. Jesus.

I also have Figma designs to edit. How can I possibly rely on Linux in this regard if none of what it’s going to show me is going to appear the way it’s going to appear to any regular Mac / Win user?

Anyway, thanks everyone. Hopefully this will get sorted out soon. Take care.

1 Like

My fonts at 400% on KDE. I’m using Inter as my system font and in Firefox. The fonts issue was always the one thing that pulled me back to Windows during my 30 years of computing. Nowadays, I actually think that Linux has equal or even superior font rendering.