Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Font Rendering issue with freetype 2.8.1 #15737

Closed
3xpl0it2c opened this issue Sep 24, 2017 · 64 comments
Closed

Font Rendering issue with freetype 2.8.1 #15737

3xpl0it2c opened this issue Sep 24, 2017 · 64 comments
Assignees
Labels
electron linux Issues that occur on Linux but not on other platforms. typography

Comments

@3xpl0it2c
Copy link

3xpl0it2c commented Sep 24, 2017

Prerequisites

  • [X ] Put an X between the brackets on this line.

Description

The fonts are looking strange,
I tried to reinstall atom three times (including the .atom directory) manually,
Tried to run on safe mode, development mode, and disabled gpu.

Steps to Reproduce

  1. Install Northen Dark Syntax And UI Themes.
  2. Use Them.
  3. Restart atom and see.

Expected behavior: [What you expect to happen]

Actual behavior: [What actually happens]

Reproduces how often: [What percentage of the time does it reproduce?]

Versions

OS: Void Linux x86_64
Model: H55M-D2H
Kernel: 4.12.13_1
Shell: zsh 5.4.2
Resolution: 1920x1080
CPU: Intel i3 540 (4) @ 3.059GHz
GPU: NVIDIA GeForce GTX 650
Memory: 7915MiB

apm --version:
apm 1.18.4
npm 3.10.10
node 6.9.5 x64
python 2.7.14
git 2.14.1

atom --version:
Atom : 1.20.1
Electron: 1.6.9
Chrome : 56.0.2924.87
Node : 7.4.0

Additional Information

2017-09-24-204828_1920x1080_scrot

@rsese rsese added the linux Issues that occur on Linux but not on other platforms. label Sep 25, 2017
@damieng
Copy link
Contributor

damieng commented Sep 26, 2017

Can you try launching with atom --disable-gpu ?

I very much suspect this is a GPU/driver issue or an incompatibility with whatever window manager that is - it's very strange that the menu bar is being rendered in a monospaced font.

@3xpl0it2c
Copy link
Author

@damieng
I tried that too (even safe mode).
I also edited the config file so editor.useGPU was set to false.
Somehow installing electron (globally via yarn) and after that installing atom v18 fixed it,
Until I installled dark-flat-ui, which from then the problem came back.. :
BTW, I use nvidia drivers, and it's i3. I can promise you it has no problems (except for the status bar XD)
I also use compton as a compositor, tried to shut it down but it didn't help.

Do you know do I disable gpu rasterization on atom ?
I saw something similar on chromium's bug search, when disabled the problem was solved.

@damieng
Copy link
Contributor

damieng commented Sep 26, 2017

Installing Electron globally is a bad idea. Electron and Atom are tightly tied together and upgrading one independently will break things.

Which atom package did you install and where from?

@3xpl0it2c
Copy link
Author

@damieng
https://atom.io/themes/dark-flat-ui
this one, I installed it from atom.

Thanks for the help, by the way.

@damieng
Copy link
Contributor

damieng commented Sep 26, 2017

Sorry I mean which atom distribution did you install? The official .deb or .rpm or another version from a 3rd party package repository?

@3xpl0it2c
Copy link
Author

@damieng
I installed via xbps,
Tried to install version 1.21 via deb file, but then went back to 1.18 via xbps.
(I use Void linux)

@damieng
Copy link
Contributor

damieng commented Sep 26, 2017

I can't think of anything else to suggest. We only support a subset of Linux systems and void and xbps aren't part of that matrix.

@piwats
Copy link

piwats commented Oct 8, 2017

It seems to be the same thing recent Firefox/Thunderbird builds have: the default font rendering engine is set to be Skia instead of Cairo:

http://z-issue.com/blog_imgs/tech/linux/fonts/mozilla_rendering/linux_firefox_thunderbird_ugly_fonts_skia_cairo.jpg

-> http://z-issue.com/wp/ugly-fonts-in-mozilla-firefox-and-thunderbird-under-linux-skia-and-cairo/

@p-boiko
Copy link

p-boiko commented Oct 16, 2017

Affects me too. Not sure if it's directly connected to atom. 1.22.0-beta1 was good, 1.22.0-beta2 shows similar trash-pixels around text symbols: http://screencloud.net/v/wIHRr
But recently I also updated some GFX-related packages for my Debian box, so not sure about the cause.
--disable-gpu doesn't heal. Settings window looks good, so only code windows and menu bar with menus (to the less extent) are affected.

upd:
just checked beta0 - same issue :(

upd2:
Debian amd64
AMD A6-1450 APU with Radeon(TM) HD Graphics
Atom checked: v1.21 (stable), 1.22.1-beta0, 1.22.1-beta1
Debian packages, that could be potentially related:
libdrm2, libdrm-amdgpu1, libdrm-common v2.4.84-2 for all

upd3:
checked other apps and seams like this bug affects every electron-based program (Visual Studio, Slack etc)

@p-boiko
Copy link

p-boiko commented Oct 17, 2017

Thank you, @piwats
While suggested workarounds there were not helpful for me, I've found a culprit – libfreetype v2.8.1. Downgrading to v2.8 solves the issue

@damieng
Copy link
Contributor

damieng commented Oct 17, 2017

@p-boiko Nice detective work!

@lemzwerg
Copy link

[Speaking as the FreeType maintainer] I'm rather sure the problem is the Skia framework which Atom is based on (so I was told) – you should upgrade to the one used by the current Firefox (version 56, I believe).

Older versions of Skia rely on an undocumented layout (i.e., not part of the official API) of the glyph buffer which has changed recently in FreeType.

@damieng
Copy link
Contributor

damieng commented Oct 18, 2017

@lemzwerg Atom is actually based on Electron which is based on Chrome. While we will pickup a newer version of Chrome with time it can take a while for these dependencies to be updated as both Chrome and Electron often change functionality in ways that can break Atom if not carefully reviewed and tested.

@Ben3eeE Ben3eeE changed the title Strange Font Rendering issue... Font Rendering issue with freetype 2.8.1 Oct 19, 2017
@mbiebl
Copy link

mbiebl commented Oct 19, 2017

@damieng do you know if the electron/chromium maintainers are aware of this issue?
I don't see this problem in chrome 62 itself, so I assume it has already been fixed there?

@bigon
Copy link

bigon commented Oct 19, 2017

https://bugs.chromium.org/p/skia/issues/detail?id=6663 << this?

@lemzwerg
Copy link

Yep.

@p-boiko
Copy link

p-boiko commented Oct 26, 2017

Hi @damieng
Are you aware of a road-map for upgrading Electron (Chromium)? If we need to wait for Chromium v62 to land in Electron → Atom to fix the issue, I'm curious how long it could take

@thomasjo
Copy link
Contributor

@p-boiko Unless it's feasible to backport the fix to Electron v1.6.x, it will take a while. As you've hinted at, it means Chromium 62 landing in Electron, and then upgrading Electron in Atom. Both of these are non-trivial tasks.

We have no roadmap to my knowledge, but even if I'm being very optimistic (and assuming a backport is not going to happen), this is unlikely to happen any time soon. I'd guess maybe January.

@ragesoss
Copy link

January, yikes. Anyone have a workaround for Debian? It looks like libfreetype 2.8.0 isn't available in the buster repo any more, so I can't downgrade via apt-get.

I'd give VS Code a try for a few months, but it looks like it's got the same issue: microsoft/vscode#35675

@ragesoss
Copy link

I was able to downgrade via the older package from snapshot.debian.org: http://snapshot.debian.org/package/freetype/2.8-0.2/#libfreetype6_2.8-0.2

sudo dpkg -i libfreetype6_2.8-0.2_amd64.deb

@p-boiko
Copy link

p-boiko commented Oct 30, 2017

@ragesoss, don't forget to apt-mark hold libfreetype6 to withhold the lib from an upgrade.
Until at least Jan '18 :)

@jrie
Copy link

jrie commented Oct 31, 2017

Thanks everyone for opening, troubleshooting and giving a proper solution to this issue! (on Debian for now)

On my Debian all is fine now... just for the sake of completeness, to "unhold" (be able to upgrade) the package again - apt-mark unhold libfreetype6 again!

Other then that thumbs up! It was pretty annoying and hard to figure out what to look for!

Just as a note, this does also work on Debian Sid (Unstable!)

@YannKervran
Copy link

I confirm : I had the same trouble under Debian GNU/Linux amd64 and the solution was fine. Thanks a lot for sharing 👍

@goldyfruit
Copy link

Same here, Debian GNU/Linux Buster.
Downgrading to libfreetype6_2.8-0.2_amd64.deb worked for me.

@rubin110
Copy link

rubin110 commented Nov 1, 2017

Confirm the workaround works on Debian Sid. Had to install both the amd64 and i386 packages.

@rubin110
Copy link

rubin110 commented Jan 4, 2018

@nathansobo This bug is still present in both the public and beta builds. It would be great to keep this ticket open until the fix from #16282 can be verified as also fixing this issue. Thanks!

@50Wliu
Copy link
Contributor

50Wliu commented Jan 4, 2018

@rubin110 we close issues as soon as the fix is merged to master to reduce the chance of incorrectly leaving issues open after the fixes are released. If it turns out that #16282 did not in fact fix this issue then we'll gladly reopen it.

@qwhex
Copy link

qwhex commented Jan 8, 2018

Workaround:

atom-text-editor {
  transform: scaleX(1.0000001);
}

@rubin110
Copy link

rubin110 commented Jan 8, 2018

@qwhex That work around worked for me. Thanks!

bitmoji

@YannKervran
Copy link

The workaround fixed also the trouble for me, thanks a lot qwhex :)

@mbologna
Copy link

mbologna commented Jan 9, 2018

Additional information: you should put @qwhex code in ~/.atom/styles.less

@jbicha
Copy link

jbicha commented Jan 30, 2018

@50Wliu and @nathansobo My understanding is that Electron only fixed this issue by merging in Chromium 61 which was only done for the 1.9 (and later) branches, not 1.7 or 1.8. Please investigate and consider reopening this bug.

@damieng
Copy link
Contributor

damieng commented Jan 30, 2018

The fix was manually backported to 1.7.10 https://github.com/electron/electron/releases/tag/v1.7.10

This is what is used in master so will be available in the next beta.

@jbwyatt4
Copy link

jbwyatt4 commented Feb 1, 2018

Thank you for backporting the fix damieng.

Can confirm qwhex's fix with mbologna's additional information works on both Debian testing and Manjaro.

@moisadoru
Copy link

A script downloads that copies libfreetype6 2.8.0 to the app folder can be found here (works on Ubuntu):

https://gist.github.com/moisadoru/aa96b54a109fe890f4a685d82dd66b11

@amarao
Copy link

amarao commented Feb 23, 2018

I've asked ubuntu guys to hold back libfreetype6 for the bionic release.
https://bugs.launchpad.net/ubuntu/+source/freetype/+bug/1751293

Those who are affected by this bug on Ubuntu Bionic, add repository of artful and use following commands:

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

(And don't forget to restart atom after this).

@bhack
Copy link

bhack commented Feb 23, 2018

If you want apt-get install atom-beta solved this native without holding freetype.

@mfuhrmann
Copy link

@bhack Does Atom have an apt source list for beta releases?

Similar to this one?
deb http://ppa.launchpad.net/webupd8team/atom/ubuntu bionic main

@bhack
Copy link

bhack commented Feb 26, 2018

@mfuhrmann https://flight-manual.atom.io/getting-started/sections/installing-atom/#debian-and-ubuntu-debapt

@TengdaHan
Copy link

@qwhex The workaround works for me on Ubuntu 18.04 Beta, thanks!

@mukku105
Copy link

yep .... Downgrading libfreetype to 2.8-0.2 helped

@bhack
Copy link

bhack commented Mar 19, 2018

It is not needed anymore. Use Atom 1.25

@rubin110
Copy link

Verified the fix without the workaround on 1.26.0-beta0 on Debian Sid.

bitmoji

@matthiasmendler
Copy link

That downgrading is quite a mess if you need devs for libgtk.

@lock
Copy link

lock bot commented Oct 24, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Oct 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
electron linux Issues that occur on Linux but not on other platforms. typography
Projects
None yet
Development

No branches or pull requests