Closed sivakov512 closed 6 years ago
@Tyriar There might be a font that is missing? (This is Linux.)
@chrmarti as for editor, I set exists fonts for editor (Droid Sans Mono Slashed, DejaVu Sans Mono and Droid Sans)
@cryptomaniac512 does it look right when you remove your custom font setting?
@Tyriar, no.
@cryptomaniac512 is this a recent regression or are you using VS Code for the first time?
@bpasero, I used the editor about 2 months ago and everything was fine.
But font has always been small in spite of GTK settings :(
@cryptomaniac512 any difference with our previous release (1.16) to see if this is a regression in 1.17 alone?
Same problem
@cryptomaniac512 I should have posted the link for 1.15 because in 1.16 we updated our UI framework (Electron) and that might have an impact too. How does it look in VSCode 1.15?
:(
Maybe try with 1.15.0 and 1.14?
This problem reproduced with 1.14.2. It looks like a problem with another software, but I have no problem anywhere instead of vscode.
And I'm sure that everything was fine a couple of months ago
Fonts look good when I set sub-pixel geometry to none
instead of RGB
This screenshot is for the 1.14.2
But fonts in latest release and 1.16 are too small (I'm working with 112 dpi) Look at window bar (File, Edit, Selection, etc)
Probably problem with Freetype.
I got the same problem when I upgrade to Freetype 2.8.1. Everything work fine with an older version of Freetype.
Someone on Phoronix forum said something about bugs with older version of Google Skia.
I have the same problem here, please advise if you find a solution / workaround. This font rendering issue occurs similarly with Atom in my case, no other applications are affected. Tested with Chromium Version 62.0.3202.18 (Developer Build) (64-bit) but also other versions, same result. I've tried also tweaking the antialias settings for my NVidia card and plasma5 environment, no success. It's really unuseable at the moment.
I can confirm that this is a FreeType related problem. Downgrading the libfreetype6
package on my Debian Sid box from 2.8.1-0.1
to 2.8-0.2
resolved this issue for me (I have also not had any problems with other applications).
Yes, I`m amazed, I've also downgraded to 2.8.0 on my gentoo desktop and the issue is gone. Thanks a lot for your reply.
This seems to be Skia bug 6663:
Hey guys, can anyone tell me how to downgrade the libfreetype6 in Ubuntu?
@wizardion The issue was introduced with freetype 2.8.1. As far as I can see, the latest version to have entered Ubuntu is 2.8 (which is the one we're downgrading to), so maybe your issue is not related to this?
@theychx As I can see with the command apt-cache policy libfreetype6
- I have Installed version: 2.8.1-0.1~xenial
. Not the 2.8-0.2ubuntu2
as you described. How can I downgrade to 2.8-0?
@wizardion try downloading the .deb and installing it manually: https://packages.ubuntu.com/bionic/amd64/libfreetype6/download
sudo dpkg -i libfreetype6_2.8-0.2ubuntu2_amd64.deb
The analogous process worked for me on Debian.
I am on Debian Testing, downgrading libfreetype6 fixed this issue.
@ragesoss Thank you for your help. I found another solution to do this on this page: https://github.com/achaphiv/ppa-fonts/tree/master/ppa. I changed the distribution from xenial to zesty after the adding a new repository, and I got 2.8-0ubuntu0.17.04ppa2
version.
Thank you for your help guys. Now the version 2.8-0 - solved my problem.
For others who are on Debian, find libfreetype6 packages for downgrading here: http://snapshot.debian.org/package/freetype/2.8-0.2/#libfreetype6_2.8-0.2 and http://snapshot.debian.org/package/freetype/2.8-0.2/#libfreetype6-dev_2.8-0.2
There are open PRs to backport the skia fix for this to old versions of Electron https://github.com/electron/libchromiumcontent/issues/384#issuecomment-342741804
An alternative to downgrading libfreetype is extracting the older libfreetype.so.6.y.y from the .deb (libfreetype.so.6.12.3 for debian stretch), drop it in de code directory (/usr/share/code on debian) and rename it to libfreetype.so.6 . VSC will then pick up this version on a restart.
This seems to be fixed in electron 1.7 branch (https://github.com/electron/libchromiumcontent/pull/385) is there any chance to have the fix in next VSCode release?
I had the same issue. 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.
Greets!
@GreatDanton How did you downgrade in debian testing?
@ddrjm, see @ragesoss's post above mine. Download old .deb package and run
sudo dpkg -i <your_package>
Package will be automatically downgraded for you.
@cyphrack Can you please tell how did you managed to change font rendering?
@josser I used the Gnome Tweak Tool. But I'm pretty sure there's some X11 config file somewhere. Here's a great tutorial. https://wiki.archlinux.org/index.php/font_configuration
Sadly not fixed in 1.19.0, but you do not need to downgrade libfreetype to make things look better. Just set FREETYPE_PROPERTIES
to use the old renderer. Run
FREETYPE_PROPERTIES="truetype:interpreter-version=35" code
from a command line, or export it in your profile.
None of the suggested workarounds seem to fix this for me. Could this be picked up? This is quite a showstopper for a large amount of linux users.
Hi, I managed to get proper font rendering with this custom fontconfig:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Force RGBA subpixel aliasing to «none» in code and code-insiders -->
<match target="pattern">
<or>
<test name="prgname">
<string>code</string>
</test>
<test name="prgname">
<string>code-insiders</string>
</test>
</or>
<edit name="rgba" mode="assign">
<const>none</const>
</edit>
</match>
</fontconfig>
Tested on Debian Sid, using:
code: 1.19.1-1513676
code-insiders: 1.20.0-1513750
libfreetype6: 2.8.1
fontconfig: 2.12.6
As a temporary workaround, maybe package maintainers could put this file in /usr/share/code/fontconfig.conf
, then symlink it to /etc/fonts/conf.d/99-vscode.conf
in a post-install script ?
Maybe a bit off-topic, but I ended up here looking how to improve Fira Code rendering in VSCode on Linux (Ubuntu 17.10). I have big 4K display, and Fira Code looked pretty ragged on it even with properly configured system anti-aliasing settings. And then I found out there is Fira Code Retina
variation of the font. Set it as follows in VSCode settings:
"editor.fontFamily": "'Fira Code Retina'"
Font looks a lot more juicy now, and I'm a lot more happier. :)
@cyphrack 's solution -- set hinting to medium and greyscale -- worked for me. Use gnome-tweak-tool
to effect these changes on Xenial. I'm really grateful to them for sharing this easy, painless solution.
I can confirm font corruption problem on Ubuntu-18.04 alpha after updating libfreetype6 from 2.8.0 to 2.8.1. The proposed solution with setting truetype interpreter version doesn't work for me, disabling subpixel rendering via custom fontconfig does. P.S. vscode version is 1.19.2
For those using gnome on debian, what font settings do you have? (size, font family, anti-aliasing, etc) I've used every method that doesn't require package holding but it doesn't seem to be working.
I have encountered same issue on debian 9.3 stretch
my libfreetype6
version was 2.8.1-1
I downgraded 2.6.3-3.2
with this command
sudo apt-get install libfreetype6=2.6.3-3.2
you can know available versions with this command
apt-cache showpkg libfreetype6
I am running Antergos linux and this issue causes Vscode to be relatively unusable. (Unfortunately, coding in VScode is my primary reason for my linux machine...) Downgrading freetype2 worked perfectly for me (none of the other mentioned fixes do) but unfortunately recent system updates break my system unless I upgrade to a more recent freetype2. So I'm a bit stuck!
I noticed this recent post on the Atom version of this issue: https://github.com/atom/atom/issues/15737#issuecomment-361742630 I know very little about how VScode actually works, but could a similar solution be done here?
Thanks!
Thanks @BanjoCam, looks like this will be fixed when we upgrade Electron.
I'm tried to build vscode 1.19.3 with electron 1.7.12 and this bug was really fixed.
@BanjoCam I am also using the latest version of Antergos (no special tweaks, running out of box) and not experienced any font rendering issues with VSCode. Linux z97 4.14.15-1-ARCH #1 SMP PREEMPT
Full system upgrade should solve your issue:
sudo pacman -Syu
@zero-master Thanks for the reply! I guess "unusable" was a bit of hyperbole, but to me the differences between the older freetype2 and the current one are pretty noticeable and I found to be hard on the eyes for longer coding sessions. I do have a fully updated system (actually with the most recent updates, something broke with keeping the older freetype installed... I ended up doing a full system reinstall, so my setup is REALLY fresh and updated and completely untweaked!).
If I get a chance later I will post a before/after shot but I am really looking forward to it being fixed!
@BanjoCam Here is how it looks on my setup:
Looking forward to your screenshots! Thanks.
Extensions: Extensions are disabled
All fonts look ugly, you can see it on screenshot:
Console output (when runs with verbose option):
Also, vscode font size outside editor (tabs, menus, etc) too small, - this is not from my gtk settings. For example, this is a screenshot of working emacs - all fonts are looks well.
I'm working on Void Linux, VSCode ran from downloaded archive. Also, I use Chromium and have no any troubles.
Reproduces without extensions: Yes