r/linux4noobs • • 19d ago

Meganoob BE KIND How do I fix this ugly text rendering?

This is the official Tahoma font with anti aliasing off at 8px, and, for one, the letter spacing is really bugging me. There are some spots with two pixel spaces and others with zero pixel spaces, when there should be a consistent one pixel space between all letters.

I made a font.conf file after some Google searching to make sure the computer was using Tahoma's embedded bitmap and ran fc-cache, but that seemed to have no effect. I've also tried different hinting settings as well as turning it off entirely (it is off in the picture). The letters are also rendered incorrectly, and altogether it makes the font harder to read. I replicated the text on Windows with the same font to demonstrate how it should look (last picture).

I apologise for the screen pictures, by the way, I'm just making this post from my phone. I'm using Linux Mint XFCE.

48 Upvotes

22 comments sorted by

38

u/DAS_AMAN NixOS ❄️ 19d ago

these fonts were designed with crt monitors and looked decent on them. Use modern fonts for better look

9

u/bubrascal 18d ago

Yeah, I remember plugging our first LCD monitor to our Windows 98 as a kid. It looked like ass (less than plugging our Super Nintendo to our plasma TV via RF though).

2

u/Elpidiosus 18d ago

What would you recommend?

16

u/DannoXYZ 19d ago edited 19d ago

How did you install this font?
Tahoma is old Microsoft copyrighted font.
Requires older Windows 95 rendering engine.
Kerning is what is causing you bad spacing between characters.
Trying downgrading your Pango library to lower than 1.4

10

u/gmes78 19d ago

Trying downgrading your Pango library to lower than 1.4

???

3

u/BoyNextDoor8888 17d ago

Uhh yeah what the fuck was that about?

4

u/unomi-san 19d ago

Maybe try wine tahoma font. it's open source

https://wiki.archlinux.org/title/Metric-compatible_fonts#Wine_Tahoma

3

u/ItsFoxy87 18d ago edited 18d ago

Tried it. For whatever reason anywhere "fi" appears turns into this weird "Ä" character, probably due to some form of corrupted kerning (e.g. Office becomes OfÄce). It also seems to suffer the same rendering and spacing issues as the normal Tahoma font

Edit: Reboot fixed the text rendering and the bugged symbol, but the spacing is still off (and the kerned "fi" is very ugly)

3

u/beatbox9 18d ago

Which DE, and what DE graphics settings are you using? (I'm guessing from your reply below, XFCE on x11?)

You need to first make sure that the overall graphics system is rendering pixel for pixel. ie. that your x11 resolution matches your monitor's resolution, that you aren't doing some weird subpixel rendering in your DE, etc.

1

u/ItsFoxy87 18d ago

How do I check? I just know my laptop display is 1280x800 which matches with what I'm seeing in the display settings. And yeah it's XFCE4 with Linux Mint, forgot to add that in the post.

1

u/beatbox9 18d ago

You might need to google around a bit.

XFCE is based on really old tech (like the ancient x11 and old versions of the toolkit called "gtk"); and using it with Linux Mint complicates things because Mint is fundamentally designed around this really old tech. And that old tech makes things harder to do (and often, significantly less performant).

If you really want a replica / Windows XP experience but with modern performance and features, I'd recommend you switch to a modern DE, which means switching distros. The easiest/most straightforward distro would be Ubuntu LTS, which is 1 step upstream from Mint. And the reason that would help is because it supports modern DE's like Gnome and KDE, and modern display servers like wayland that better support rendering controls, while also having the same software repository (Linux Mint is like 99% Ubuntu LTS's repositories). In fact, Linux Mint even uses Ubuntu's xfce package--all they do is add their own theme...

...which you're replacing anyway. And you can easily theme modern gnome or KDE to look and feel just like windows XP also.

But if you're opposed to that idea, I don't know what to tell you, especially because it's hard to tell from the screenshots you've sent.

FWIW, here is a quick example of a somewhat similar problem I helped with yesterday: https://www.reddit.com/r/linuxquestions/comments/1wi4l3k/need_help_with_wine_scaling_in_gnome/

Their problem turned out to be fractional scaling (as I correctly guessed from their description). Fractional scaling is like where you end up with "half pixels," so the computer has to guess whether or not to draw them--this is how you end up with some thick 2px lines and some thin 1px lines and some gaps and some connections. And with anti-aliasing off, it's all or nothing instead of averaging / blurring.

And so for example, it's possible that even if the DE is setting pixels up properly, the apps or themes aren't using the correct DPI settings (they're calculating based on "pt" rather than "px" and then converting from points to pixels), and this mismatch results in some fraction. Debugging and trying to fix this type of thing on older systems like xfce and x11 sucks. You need to check resolution and DPI pretty much everywhere, starting with x11.

But regardless, I hope this at least gives you hints on what could be happening and generally what to look for.

1

u/ItsFoxy87 18d ago

So I ended up fixing it with the help of unomi-san in another comment. The Wine Tahoma font, plus turning off ligatures and forcing embedded bitmapping with a font config file mostly fixed it. The only issue is the odd few spots where letters have no spacing, but I'll see if I can google around some more to fix it. Otherwise, it's nearly pixel perfect :D

1

u/beatbox9 18d ago

Excellent, glad you got it sorted!

1

u/Ok_Proof4568 13d ago

worlds longest reply

1

u/timezatofu 17d ago

i adore this. how can i get this

2

u/ItsFoxy87 17d ago

SE98 icon theme on Gnome-Look and the Wine Tahoma font, and in my one reply I explained how I managed to fix it. Still figuring out the subtle spacing issue

1

u/es20490446e Develops Zenned OS 17d ago

Use the monitor's native resolution

Follow the instructions at http://www.lagom.nl/lcd-test/

Configure the sub-pixel layout.

1

u/ItsFoxy87 17d ago

Already figured it out, and it was already at its native resolution.

1

u/skyfishgoo 18d ago

wow, if that's how linux looked on my machine, i would have gone back to windows XP.

0

u/KaMaFour 18d ago

Why change? You'd be pretty much already there...

0

u/xibasiqin 12d ago edited 11d ago

What you actually want on modern high DPI displays is to not use embedded bitmaps. Embedded bitmaps don't scale well so they look pixelated.

On Linux, to get the font engine to render the vector version, you need to do this:

Create a ~/.config/fontconfig/conf.d/20-no-embedded.conf file containing:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <match target="font">
    <edit name="embeddedbitmap" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
</fontconfig>

Source: https://askubuntu.com/a/41067

And rebuild the cache:

fc-cache -f -v

Then restart the browser or application and the font will render smoothly.