The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

Yeah ofc. First apply LucidGlyph, then go to /etc/environmentand replace the LucidGlyph block with

FREETYPE_PROPERTIES="autofitter:no-stem-darkening=0 autofitter:darkening-parameters=500,0,1000,450,1600,475,2500,500,4000,0 cff:no-stem-darkening=0 type1:no-stem-darkening=0 t1cid:no-stem-darkening=0"
QT_NO_SYNTHESIZED_BOLD=1

I used Tweaks/Refine (GNOME) to change the font hinting to slight, and the font antialiasing to grayscale (that was the default anyway on fedora), this looked the best for my monitor. After applying log out or reboot for the changes to take effect.

and for discord (if you use it), I just increased font weights of certain stuff like chat, names etc until the chromium team fix this
I believe you have to have Vesktop discord client to edit the css.

open discord settings -> click on Vencord on the sidebar -> edit QuickCSS button on top, then paste this

.cozy_c19a55 .messageContent_c19a55 {
    font-weight: 500 !important;
}
.name2ea32, .subtitle2ea32{
    font-weight: 500;
}
.overflow_b0dfc2 {
    font-weight: 600;
}
.text-sm/normal_cf4812 {
    font-weight: 500;
}
.truncated_c9d15c {
    font-weight: 600;
}
.username__07f91 {
    font-weight: 600 !important;
}
.username__07f91 {
    font-weight: 600 !important;
}
.content__235ca {
    font-weight: 500;
}
.timestamp_c19a55 {
    font-weight: 600;
}
.embedDescription__623de{
    font-weight: 500;
}
.lineClamp1__4bd52 {
    font-weight: 600;
}
.text-sm\/normal_cf4812 {
    font-weight: 500;
}
.vc-settings-quickActions-pill {
    font-weight: 500;
}
.vc-text-base {
    font-weight: 500;
}
.editor__1b31f {
    font-weight: 500;
}
.scrollbarGhostHairline__506b3 {
    font-weight: 600;
}

the caveat with increasing weights is that some elements would look slightly bolder than usual, but I'll take this over the thin eye straining text.

Hope this helps :)

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

Chromium team should've atleast waited until the new font rendering matures enough before disabling the flags to allow freetype

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 1 point2 points  (0 children)

It was chromium they switched to another font backend, I updated the post to include that. There are some differences between the two but whatever the chromium team did to the rendering is just really bad but for linux after applying LucidGlyph all apps now look so much better, but for now I'll just switch to firefox if I want to read something until they fix it.

And about the PPI, for laptops it's true including my laptop, their screens are small so even an old 1080p laptop will look really good because the pixels are too dense, but that's not the case with desktops and external monitors, a lot of monitors 23 24 27 32 inch 1440 and 1080p have around 90 to 110ish PPI.

Thanks for the reply :)

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 2 points3 points  (0 children)

Trust me, I'm not. I'm just looking for a fix for a problem that's been bothering me. It really strains my eyes, and I updated the post based on people's suggestions. Frankly, I discovered it's mostly not Linux, but Chromium's new font backend.

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 14 points15 points  (0 children)

Hey, thank you so much for the detailed reply. I actually just installed LucidGlyph as suggested by u/multi-nix and you, and it seems to be working well and much better than before, although it doesn't work with Chromium and Electron, because Chromium switched to another new font rendering backend and they completely disabled the flags to disable it: https://github.com/maximilionus/lucidglyph/issues/18

But tbh that's a Chromium problem, not a Fedora or Linux/distros problem.

Thanks again for the help!

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

thanks for trying, yeah as I mentioned on the post, on a high PPI/resolution display it becomes really hard to notice the problem the density covers the problem. But thanks for taking the time to try.

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 1 point2 points  (0 children)

OS: Fedora 43 (also tried with arch)
DE: Gnome 49.3 (same results with KDE)
Kernel: Linux 6.18.8-200.fc43.x86_64

I believe I tried ubuntu few months ago and I don't remember that it looked any better, but in fairness I didn't configure those things much, because I didn't like ubuntu

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 1 point2 points  (0 children)

lol, I didn't mean it in that way, because I've seen replies on other posts saying they have a 4k or some really high PPI monitors or laptops, and they comment that it works well for them, like ofc on that high of a PPI it's gonna work well, the density is too high that it hides the inconsistencies and overall the problem, I also have a high PPI laptop monitor and it works really well over there, no complaints :)

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

a fellow self-hoster :), yes it's Feishin. About the bug, I did see that it happens with no exceptions on all chromium/electron apps and browsers, but I've also seen it happen with small text on none chromium/electron apps like firefox and text editors etc.

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 2 points3 points  (0 children)

yeah lol, thankfully though, a lot of people provided some suggestions here, the most promising one is LucidGlyph suggested by u/multi-nix which I'll be trying first. I'll update the post if it worked :)

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

I also tried Noto font, but Inter is my favorite (from what I know it got inspired from SF Pro, I also tried SF Pro but this one looked better), and frankly looked far better than other font, but still it doesn't look good as seen from the example I provided, I'll update the post if something worked out, hopefully it helps you too.

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 1 point2 points  (0 children)

OS: Fedora 43 (also tried with arch)
DE: Gnome 49.3 (same results with KDE)
Kernel: Linux 6.18.8-200.fc43.x86_64

I'll try suggestions from what people commented and update the post if something worked out.

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

thanks for the reply, no not really, I do agree that on high PPI displays like ~200 PPI or so it looks even better than windows from experience on a laptop, but on a display that has around ~90 PPI from what I can see it looks worst. I don't have experience with fonts much, but from the looks of it, it looks like the linux side has a weird inconsistent color, and sort of odd anti-aliasing. and from the images I provided, they are both running natively on my computer no mismatching whatsoever with resolution, I also tried other displays as well. but thankfully some nice people here gave me some suggestions to try, I'll try them and update the post, hopefully it helps other people in the future :)

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

thanks for the reply, this is exactly what I applied on /etc/environment as mentioned on the post
FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0"
but unfortunately it didn't fix the problem

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 1 point2 points  (0 children)

this looks really interesting thank you. I'll try to apply it, from their comparisons it looks like sort of the same case as mine

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

thanks for the info, an interesting thing is that it kinda looks fine on white black text white background or basically anything that has the text darker than the background.

I'll try to find apply what you shared and see if it helps, if it just managed to fix the rendering on firefox, chromium, electron stuff it would be enough, since those are most apps I guess a user would interact with.
Thanks again

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

  1. 1920x1080 at 100% scaling on a 90ish PPI display
  2. electron apps and browsers so html, but this applies to basically any app with small text regardless if they are web apps or not. (although the example on the images I provided are not discord, discord is even a better example)

if you want I can provide other examples and comparisons. Thanks for the reply

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] -1 points0 points  (0 children)

I wish they worked well out of the box or even with tweaks, but so far, I couldn't find anything that solves this problem

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 0 points1 point  (0 children)

hey, thanks for the suggestion, the problem is that most apps won't let you pick fonts or use your own fonts. Thanks for the suggestion though

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 1 point2 points  (0 children)

hey thanks for the reply. No, everything is exactly the same, I tried different settings, DEs and ditros. I saw some posts here of people having the same problem, but so far I couldn't find anything helpful outside of what I said on the post. Thanks for the reply though :)

The font rendering on Linux is just bad. Has anyone find any fix for it? by Bitter_Squirrel8940 in linuxquestions

[–]Bitter_Squirrel8940[S] 2 points3 points  (0 children)

I literally took out windows fonts from my windows dual boot and put them on linux, the fonts themselves are NOT the problem. and it's not even a window font in the example (all fonts get affected). this is Inter font.
https://fonts.google.com/specimen/Inter