adobe/brackets

Bad Font rendering on Linux (Ubuntu/Linux Mint)

Opened this issue ยท 14 comments

Prerequisites

  • Did you perform a cursory search to see if your bug or enhancement is already reported? (#14451 & possibly related to #14481)
  • Can you reproduce the problem with Debug -> Reload Without Extensions?
  • Did you read the Troubleshooting guide?

For more information on how to write a good bug report read here
For more information on how to contribute read here

Description

brackets_screenshot
Obvious render issues have been highlighted (These are more pronounced in Dark Themes)

Steps to Reproduce

  1. Download & install Brackets 1.13 (after repackaging according to #14338 & #14171)
  2. Open Brackets, notice the badly rendered fonts
  3. Relaunch with all extensions (whatever extension is on a fresh install) disabled
  4. Notice the badly rendered fonts persist

Expected behavior: Fonts to rendered smoothly like in any other Editor
Actual behavior: Badly rendered fonts

Versions

Please include the OS and what version of the OS you're running.
Linux Mint 19 Cinnamon Tara [Linux 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:15:38 UTC 2018 i686 i686 i686 GNU/Linux]
Please include the version of Brackets. You can find it under Help -> About Brackets (Windows and Linux) or Brackets -> About Brackets (macOS)
Brackets-Release 1.13 build 1.13.0-17696 (release 49d29a8) 32-bit

@toxicmender
It seems Brackets is using bitmap fonts and it uses the Linux libfreetype6 package for font rendering.

Prior to Ubuntu 18.04 (on which Linux Mint 19 is based), the libfreetype6 package version was 2.8.0 (libfreetype6_2.8-0.2, available in the artful ubuntu packages).
But Ubuntu 18.04 (and hence Linux Mint 19) switched to libfreetype6 version 2.8.1 (libfreetype6_2.8.1-2ubuntu2, available in the bionic and cosmic ubuntu packages) which has a bitmap font rendering bug: https://bugs.launchpad.net/ubuntu/+source/freetype/+bug/1769132
That bug was fixed in the next libfreetype6 version (libfreetype6_2.9.1-3, available in the disco ubuntu packages), but it's not available yet.

You can check this long thread for some info and fix suggestions: #14290

To fix Brackets font rendering you need to either downgrade to libfreetype6_2.8-0.2 or upgrade to libfreetype6_2.9.1-3, only the downgrade worked for me.

Here is the downgrade fix that worked for me:

  1. Download libfreetype6_2.8-0.2 based on your platform from:
    http://snapshot.debian.org/package/freetype/2.8-0.2/#libfreetype6_2.8-0.2
    e.g.
    http://snapshot.debian.org/archive/debian/20170630T215111Z/pool/main/f/freetype/libfreetype6_2.8-0.2_amd64.deb

  2. Open a terminal in the folder where you downloaded the file and run:
    sudo apt-get update
    sudo apt-get install ./libfreetype6_2.8-0.2_amd64.deb
    sudo apt-mark hold libfreetype6
    (the last command is to mark libfreetype6 so that it's not auto-updated by Linux back to the buggy version)

Krelh commented

I fixed it by opening MATE Tweak (I use ubuntu mate) then to Windows then Fonts and here you can choose Rendering option which by default is set on Subpixel smoothing (LCDs), if you select Best shapes all these bad pixels will dissapear

@cosmin-vi 's solution worked for me. Thanks so much!

This issue is open for a while, but I hope someone can help me.

I use elementaryOS 5.1, based on Ubuntu 18.04.3 LTS, the atual package is libfreetype6 2.9.1-0asaw, and here is how the newest version, but i have the same problem with the fonts. I researched but I couldn't solve. Someone knows how to resolve this?

Krelh commented

This issue is open for a while, but I hope someone can help me.

I use elementaryOS 5.1, based on Ubuntu 18.04.3 LTS, the atual package is libfreetype6 2.9.1-0asaw, and here is how the newest version, but i have the same problem with the fonts. I researched but I couldn't solve. Someone knows how to resolve this?

as I said before you have to reach out you system font settings (if it's ubuntu based then it should be in Appearance) then into font section you have to choose Best shapes

This issue is open for a while, but I hope someone can help me.
I use elementaryOS 5.1, based on Ubuntu 18.04.3 LTS, the atual package is libfreetype6 2.9.1-0asaw, and here is how the newest version, but i have the same problem with the fonts. I researched but I couldn't solve. Someone knows how to resolve this?

as I said before you have to reach out you system font settings (if it's ubuntu based then it should be in Appearance) then into font section you have to choose Best shapes

so, only chose other font?

Krelh commented

@christyanbrayan no, you have to change only rendering type it's all about the rendering not font you use. I will put a image to show you better
I never used elementaryOS so I can't help you find font settings but I'm sure it's not so hard. You should search for appearance or tweak
appearance

@Krelh
I researched it here and it looks like it doesn't have this configuration natively, but I found the 'Infinality' solution, which I still haven't been able to install for some reason. I'll see here, but thanks anyway

tlotr commented

I am using ZorinOS 15. I used the Gnome Tweak tool to make the changes to font rendering. The below settings worked for me.

Screenshot from 2020-03-22 10-11-05

@tlotr thank you! finally something that worked, I was almost giving up on using the my favorite editor

@tlotr thank you!
This really helps.

@tlotr That Worked thanks I was reinstalling brackets but it was not working finally thank god

The bug might come from mishandling of padding in sub-pixel bitmaps. It is best to trust FreeType here.