Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[Ubuntu 18.04 LTS] Font not rendering properly #14290

Open
bypassspace opened this issue May 1, 2018 · 76 comments
Open

[Ubuntu 18.04 LTS] Font not rendering properly #14290

bypassspace opened this issue May 1, 2018 · 76 comments

Comments

@bypassspace
Copy link

bypassspace commented May 1, 2018

Hello,

After installing brackets on Ubuntu 18.04 LTS... i noticed fonts are not rendering properly. I checked for all the font related solution still no luck.

Here is the screenshot what my screen is look like: https://ibb.co/b7393n

And here is the Brackets version : https://ibb.co/ndUow7

Font Settings:

Font : Ubuntu
Font Size : 14

Thanks

@bypassspace bypassspace changed the title Font not rendering properly [Ubuntu 18.04 LTS] Font not rendering properly May 1, 2018
@vassilis
Copy link

vassilis commented May 1, 2018

Having the exact same issue with atom after upgrading Ubuntu from 17.10 to 18.04. So I guess the issue comes from Ubuntu, not the editors...

@yahuarkuntur
Copy link

I also upgraded to Ubuntu 18.04 and have the same font display issue.

@navch
Copy link
Contributor

navch commented May 8, 2018

We are looking into this issue. More details will be updated shortly.

@pawelzydziak
Copy link

Me too, it's strange, because it seems to render properly in editors like VS Code, Pycharm or NetBeans, but in Google Chrome fonts looks terrible.

@g-217
Copy link
Contributor

g-217 commented May 9, 2018

For font issue, libpango can be a reason. This package exists with two names in Ubuntu18.04(It was renamed recently, that's why transitional package)

libpango-1.0-0/bionic,now 1.40.14-1 amd64 [installed]
  Layout and rendering of internationalized text

libpango1.0-0/bionic,now 1.40.14-1 amd64 [installed,auto-removable]
  Layout and rendering of internationalized text (transitional package)

Please check if you have both installed.

@michau-krakow
Copy link

michau-krakow commented May 9, 2018

Same here. All I did to fix font rendering is I updated atom to 1.26.1. Worked like a charm.

@vkarick
Copy link

vkarick commented May 10, 2018

Also have same issue in Chrome. Looks ugly. How to fix it?

@vkarick
Copy link

vkarick commented May 10, 2018

ugglyfont
Looks like this

@ikebeight
Copy link

screenshot from 2018-05-11 00-50-50
Me too. And I've comfirmed packages that @gautam0217 says are installed.

ikebeight@bionic:~$ dpkg -l | grep libpango
ii  libpango-1.0-0:amd64                       1.40.14-1                           amd64        Layout and rendering of internationalized text
ii  libpango1.0-0:amd64                        1.40.14-1                           amd64        Layout and rendering of internationalized text (transitional package)
ii  libpangocairo-1.0-0:amd64                  1.40.14-1                           amd64        Layout and rendering of internationalized text
ii  libpangoft2-1.0-0:amd64                    1.40.14-1                           amd64        Layout and rendering of internationalized text
ii  libpangox-1.0-0:amd64                      0.0.2-5                             amd64        pango library X backend
ii  libpangoxft-1.0-0:amd64                    1.40.14-1                           amd64        Layout and rendering of internationalized text

Shoud I remove it?

@michau-krakow
Copy link

michau-krakow commented May 10, 2018

I would not.
This thread atom/atom#15737 provides elaborate discussion about identical issue with font rendering, its root cause, dependencies, workarounds... They narrowed it down to libfreetype library and finally fixed.

@newhoa
Copy link

newhoa commented May 10, 2018

This is a problem in FreeType 2.8.1 (libfreetype6). The solution is either downgrading to the Ubuntu 17.10 version (2.8.0), or upgrading to the latest 2.9.1 where the issue has been fixed. Unfortunately I couldn't find a .deb for Ubuntu or Debian yet, but I was able to find this OpenSUSE binary.

I downloaded that, extracted the libfreetype.so.6.16.0 binary. Then I went to /usr/lib/x86_64-linux-gnu/ and renamed libfreetype.so.6.15.0 file to old-libfreetype.so.6.15.0. Then I copied the new libfreetype.so.6.16.0 file to the folder and renamed it to libfreetype.so.6.15.0.

A roundabout way of doing it I guess, but it works. No more artifacts!

@michau-krakow
Copy link

michau-krakow commented May 11, 2018

Easier method is to start searching from launchpad.net or packages.ubuntu.com (I prefer the latter, as it provides clear info about package dependencies, to check what else am I missing).

@newhoa
Copy link

newhoa commented May 11, 2018

Yeah, hopefully it will hit the repositories soon and everyone will get the fix more easily. It may hit Debian first (keep an eye here).

Either way, this is a problem with FreeType and not with Brackets, so I think this issue could probably be closed.

@g-217
Copy link
Contributor

g-217 commented May 11, 2018

Source of font rendering issue is libfreetype6-2.8.1 which is default version for Ubuntu-18.04.
Upgrading or downgrading libfreetype6 will fix this issue.

You can download libfreetype6_2.8-0.2_amd64.deb from here for downgrading case:
http://snapshot.debian.org/package/freetype/2.8-0.2/#libfreetype6_2.8-0.2

Updating to version 2.9.1 will also fixed the issue, but I could not find a package for this version. I have built it from source(https://download.savannah.gnu.org/releases/freetype/freetype-2.9.1.tar.gz) on Ubuntu-18.04(amd64) and put the binaries here.
https://github.com/gautam0217/dot_profile/tree/master/freetype291

@michau-krakow
Copy link

Yes, downgrading libfreetype6 is a workaround BUT on the other hand, Atom renders fonts fine even on existing version 2.8.1-2ubuntu2 (18.04 default).
In my opinion this suggests the library itself is fine but it may just be used wrong way by Bracket (as Atom/Electron/Chrome did in older versions).

@ghost
Copy link

ghost commented May 29, 2018

I can confirm it's a libfreetype6 2.8.1-2ubuntu2 issue. I mean, I see problematic font rendering in many other applications. Not only are the fonts themselves "broken" and "off", but the font sizes vary continuously. First I thought my display size settings were varying autonomously, but in the end it turned out to be the font size.
As for Canonical solving this: well, I think personally the down/ upgrade suggested here is the better, and certainly the quicker solution. After all, the reports on the fishy libfreetype6 version on git and Launchpad (e.g. https://bugs.launchpad.net/ubuntu/+source/freetype/+bug/1722508) were already there in mid 2017, when in a previous *buntu release. So it'd be surprising if it now would be resolved instantly... DNS leak anybody?

@xfg
Copy link

xfg commented May 30, 2018

@gautam0217 I install libfreetype6_2.8-0.2_amd64.deb through dpkg -i but after restart my ubuntu 18.04 upgrades the package to libfreetype6-2.8.1 back. How to solve this problem ?

@michau-krakow
Copy link

If it installs automatically, why don't you just disable automated upgrades? Another option is to use apt-pinning but it's too much to explain - just google it.

@GocaninTs
Copy link

GocaninTs commented Jun 2, 2018

sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main"
sudo apt-get update
sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1
sudo apt-mark hold libfreetype6

Screenshot from 2019-11-29 12-15-54

These commands solved my problem.

@sobisht
Copy link
Collaborator

sobisht commented Jun 14, 2018

Thanks for pointing out your issues.
We will update this thread with fix related to this issue.

@morettolss
Copy link

GocaninTs solution works well :D
#14290 (comment)

@ankur22
Copy link

ankur22 commented Jul 19, 2018

I just installed the latest version (1.28.2) of Atom from https://github.com/atom/atom/releases and it has resolved this issue for me.

@briskycat
Copy link

I could not find freetype 2.9.1 packaged for Debian/Ubuntu so I created a PPA for Ubuntu 18.04 Bionic Beaver myself: https://launchpad.net/~as-asaw/+archive/ubuntu/fonts
Basically, I just replaced the sources in the Bionic's original 2.8.1 package and threw away a couple of patches meant to clean up the 2.8.1's code. The libfreetype6 deb package itself can also be installed on Ubuntu 16.04. Hope it will be useful to someone.

@briskycat
Copy link

briskycat commented Jul 30, 2018

@trytip That's very strange. What exactly do you mean by the "file" that you were trying to install? Did you add the PPA in the usual way (i.e. as in the description)? In fact, there are i386 versions of all packages in my PPA as you can see here: https://launchpad.net/~as-asaw/+archive/ubuntu/fonts/+build/15142100 (here is the libfreetype6:i386 deb) And even if there weren't I am still curious how this PPA could have broken anything keeping in mind that APT keeps track of all dependencies.

@trytip
Copy link

trytip commented Aug 3, 2018

@briskycat
completely my mistake. had issues with signature install and only downloaded x64 files. your PPA is working fine. thank you for that

@Grantimus9
Copy link

I just updated Ubuntu from 16.04 LTS to 18.04 LTS and experienced the same problem in Atom. Uninstalling and re-installing Atom solved it for me.

@AnwarShah
Copy link

Setting these in a file /etc/profile.d/fix-freetype.sh worked for me

export FREETYPE_PROPERTIES="truetype:interpreter-version=35 cff:no-stem-darkening=1 autofitter:warping=1"

@asfernandes
Copy link

@AnwarShah that maked gedit and synaptic very nice for me, but at the same time made Chrome very awful.

@DGPickett
Copy link

DGPickett commented Dec 3, 2018 via email

@DGPickett
Copy link

DGPickett commented Dec 17, 2018 via email

@rekurzion
Copy link

I'm running xubuntu 18.04. I've just ran into this issue (only with brackets) and have noticed it is only a problem when installing using the .deb file provided from their site. when installing using snap there are no font rendering issues.

why the difference?

@AnwarShah
Copy link

I'm running xubuntu 18.04. I've just ran into this issue (only with brackets) and have noticed it is only a problem when installing using the .deb file provided from their site. when installing using snap there are no font rendering issues.

why the difference?

Which snap are you referring to?

@rekurzion
Copy link

rekurzion commented Dec 30, 2018

the snap for brackets, developed by snapcrafters according to the xubuntu Software store. excuse my ignorance if you are asking for something different, I'm just getting my head around snaps. I've since uninstalled the snap version and downgraded libfreetype6 to the previous working version and installed the .deb from brackets website and this has resolved the problem for me.

@BinoyDarvin
Copy link

sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main" sudo apt-get update sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1 sudo apt-mark hold libfreetype6

This help me .

Worked for me too!

@tiagofrancafernandes
Copy link

This resolve to me
#14610 (comment)

@Hamper
Copy link

Hamper commented May 28, 2019

chromium (v61+), atom (atom/atom#15737), vscode (microsoft/vscode#35675), electron (electron/libchromiumcontent#387, backported from chromium 61) allready solve this issue. Can a similar approach be used for brackets?

@DGPickett
Copy link

Here's a continuing flavor of this problem. I just put up a new Ubuntu 18.04.2 system on an empty disk using a usb pen drive iso image, and while it has Verdana on LibreOffice, Verdana is missing in Google Docs/Sheets, on both Chrome and FireFox.

@Combinacijus
Copy link

sudo apt-get install libpango1.0-0
Try this command it solved the problem for me

@lahtis
Copy link

lahtis commented Jul 30, 2019

Just install a new Ubuntu 18.04.2 and fonts look just awful. Hasn't been fixed yet.

@DGPickett
Copy link

I found it was easy to fix. My shell history shows:

sudo apt install ttf-mscorefonts-installer
sudo apt-get install msttcorefonts
sudo alien Downloads/freetype-2.9.1-2.fc29.x86_64.rpm
sudo dpkg -i *.deb+
sudo dpkg-reconfigure ttf-mscorefonts-installer

It's somewhere out that way?

@lahtis
Copy link

lahtis commented Jul 30, 2019

Nope. it is not working.
Why all some images are Firefox in dirty. It not rendered properly.

@romasvrd
Copy link

romasvrd commented Sep 4, 2019

sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main" sudo apt-get update sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1 sudo apt-mark hold libfreetype6

These commands solved my problem.

Well, I couldn't install it from repo but I downloaded the deb from https://launchpad.net/ubuntu/artful/amd64/libfreetype6/2.8-0.2ubuntu2.1

and then

sudo apt-get install libfreetype6=2.8-0.2ubuntu2.1 
sudo apt-mark hold libfreetype6

now it's allright, thank you!

@romasvrd
Copy link

romasvrd commented Sep 4, 2019

Another solution is to download the sources of https://launchpad.net/ubuntu/artful/amd64/libfreetype6/2.8-0.2ubuntu2.1

extract it and create a directory for binaries, i.e. ~/libfreetype6bin. Now go to the folder with the extracted sources of libfreetype, and put
./configure --prefix="/path/to/that/folder
make
sudo make install

after that you can copy libraries into Brackets executable folder, or link them. That must work

@deutrino
Copy link

deutrino commented Oct 1, 2019

Upgrading by downloading the latest libfreetype6 for buster from packages.debian.org and running sudo dpkg -i libfreetype6_2.9.1-3_* successfully updated libfreetype6 to 2.9.1-3 on Ubuntu 18.04 for me, but did not solve this problem.

@deutrino
Copy link

deutrino commented Oct 1, 2019

From microsoft/vscode#35675 (comment)

A workaround without having to change freetype, is to change your font rendering to standard grayscale antialiasing and slight / medium hinting. This issue only occured (at least for me) when I had the subpixel antialias.

This worked for me.

@urbandroid
Copy link

Problems are caused by Intel processor are there any body out here that saw this problems and don't use Intel CPUs(i doubt it)?

@lahtis
Copy link

lahtis commented Nov 28, 2019

Problems are caused by Intel processor are there any body out here that saw this problems and don't use Intel CPUs(i doubt it)?

Yes. we have. Im using AMD Phenom CPU and i have same problem. (AMD Phenom(tm) II X4 965 Processor)

@DGPickett
Copy link

Dudes, it is fixed now for most of us, and we still have the same CPUs. Read more carefully, think more discerningly.

@CodePint
Copy link

CodePint commented Feb 1, 2020

Still an issue on Ubuntu 18.04, vs code renders text fine.

I would rather not have to mess around with font packages to implement a fix.

@christyanbrayan
Copy link

I have libfreetype6 2.9.1-0asaw, here is how the newest version, but it´s not solved the problem for me. Someone knows something about?

@DGPickett
Copy link

DId you do all the steps given above? Because it seems to have worked for us now these many months later, still.

@christyanbrayan
Copy link

DId you do all the steps given above? Because it seems to have worked for us now these many months later, still.

i thinked that with the last version would not have problems. So, i´m goingo to try the downgrade

@ltrottier
Copy link

the snap for brackets, developed by snapcrafters according to the xubuntu Software store. excuse my ignorance if you are asking for something different, I'm just getting my head around snaps. I've since uninstalled the snap version and downgraded libfreetype6 to the previous working version and installed the .deb from brackets website and this has resolved the problem for me.

Thanks, that solved it for me. Note, I had to install the deb package following these instructions due to a package dependency problem with libcurl3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests