Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font is always black after installing macOS 11 (Source Code Pro font or derivatives need to be updated) #100840

Closed
anukul opened this issue Jun 23, 2020 · 50 comments · Fixed by ryanoasis/nerd-fonts#555
Assignees
Labels
font-rendering Font rendering issues macos-big-sur themes Color theme issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@anukul
Copy link

anukul commented Jun 23, 2020

  • VSCode Version: 1.46.1
  • OS Version: macOS Big Sur Version 11.0 Beta (20A4299v)

Steps to Reproduce:

  1. Upgrade to macOS 11.0 Developer Beta 1
  2. Open VS Code, switch between the bundled colour themes

image

Does this issue occur when all extensions are disabled?: Yes

@beratgashi
Copy link

Same problem here :/

@AugustDev
Copy link

Same problem, unworkable.

@aeschli
Copy link
Contributor

aeschli commented Jun 24, 2020

Likely a Electron/Chromium issue...

@miguelsolorio
Copy link
Contributor

miguelsolorio commented Jun 24, 2020

Not sure if this helps but I also upgraded to Big Sur and don't see this happening (either on Stable or Insiders):

image

Specs:

@adregia
Copy link

adregia commented Jun 24, 2020

For what it's worth, the issue subsided for me when I disabled my custom font settings.

With custom font enabled:
Screen Shot 2020-06-24 at 1 12 43 PM

Without:
Screen Shot 2020-06-24 at 1 12 56 PM

The issue appears to manifest itself with Hasklig in particular. As you can see, Verdana is not problematic (also tried Helvetica):
Screen Shot 2020-06-24 at 1 15 42 PM

Although Hasklig is not a pre-installed system font, I also tried Lexend Deca, which is also custom, and presented no issues rendering color. Reinstalling Hasklig did not alleviate the issue.

Scopes inspector indicates the correct foreground color:
Screen Shot 2020-06-24 at 1 20 02 PM

@miguelsolorio
Copy link
Contributor

@adregia thanks for investigating, can also confirm that using Hasklig breaks syntax highlighting. Other custom fonts like Input Mono seem to work fine though.

@aeschli aeschli assigned alexdima and unassigned aeschli Jun 26, 2020
@alexdima alexdima added the font-rendering Font rendering issues label Jun 28, 2020
@alexdima
Copy link
Member

@misolori I think this might be an electron/chromium issue. Could you please try the standalone editor in Chrome -- https://microsoft.github.io/monaco-editor/ . You could just edit the font-family on the editor view-lines dom node.

@miguelsolorio
Copy link
Contributor

@alexdima also repros on the standalone editor in Chrome:

image

@alexdima alexdima added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jun 29, 2020
@alexdima
Copy link
Member

It looks like this font does not want to be rendered with colors in Big Sur by Chromium.

@misolori Could you please create a simple HTML page and report an issue to Chromium at https://bugs.chromium.org/p/chromium/issues/list

@miguelsolorio
Copy link
Contributor

Created https://bugs.chromium.org/p/chromium/issues/detail?id=1100502. Also worth noting that I tested this on Safari, Firefox, and Edge and they all fail to render the text except for Safari.

@bpasero bpasero added the upstream-issue-linked This is an upstream issue that has been reported upstream label Jun 30, 2020
@alexdima
Copy link
Member

Thanks a lot @misolori !

@jeremyFreeAgent
Copy link

I can confirm Hasklig breaks colors. Same issue on Hyper (https://github.com/vercel/hyper/).

@zavan
Copy link

zavan commented Aug 10, 2020

"editor.fontFamily": "Source Code Pro" breaks it too, same problem. Removing the setting works.

@balupton
Copy link

Is font ligatures to blame then?

@lllyin
Copy link

lllyin commented Aug 31, 2020

disable the editor.fontFamily. i am working.

@madeleineostoja
Copy link

madeleineostoja commented Sep 1, 2020

This is down to a Source Code Pro rendering bug in chromium. I have no idea why, but anywhere that uses it or it's derivatives, including websites etc, has the same issue.

Changing your font family to any other font will fix it.

@falcn
Copy link

falcn commented Sep 18, 2020

The issue appears to manifest itself with Hasklig in particular.

For anyone who needs replacement, ligaturized Source Code Pro is the same font as Hasklig, and it works with Big Sur
https://github.com/ToxicFrog/Ligaturizer/

@WillBeebe
Copy link

Downloading other font families you can easily repo this in OX11

W/ Monoid, it works, without it doesn't. Same w/ Hasklig

"Monoid", "Source Code Pro", sans-serif

@leepowelldev
Copy link

leepowelldev commented Nov 13, 2020

Is there anything close to Source Code Pro which is known to work?
UPDATE: Just downloaded Source Code Pro again from Google Fonts, and overwrote my existing files, seems to work ok now.

@punchcutter
Copy link

The latest releases of Source Code Pro and Source Han Code JP have removed the SVG table to make them work as expected on macOS 11.

@leepowelldev
Copy link

leepowelldev commented Nov 25, 2020

Does anyone using Source Code Pro get a collapse on certain html elements/attributes which end in 'l' and the attribute starts with 'l' ?? Screenshot attached showing how it behaves on <html lang="en"> - it seems to collapse the whitespace and replace it with a dot.

Screenshot 2020-11-25 at 09 17 49

@alexdima
Copy link
Member

@leepowelldev Yes, I've seen this before. See #106583. The workaround is to use "editor.fontLigatures": "'ccmp' off"

@alexdima alexdima changed the title Font is always black after installing macOS 11 (fonts need to be reinstalled) Font is always black after installing macOS 11 (Source Code Pro font or derivatives need to be updated) Nov 25, 2020
@leepowelldev
Copy link

@alexdima Thank you so much! You have no idea how much that's been driving me nuts!

@arjunguha
Copy link

Very helpful. Thanks. I'm using Source Code Pro Version 2.030;PS 1.0;hotconv 16.6.51;makeotf.lib2.5.65220 and MacOS 11.0.1. Setting "editor.fontLigatures": "'ccmp' off" did not work for me.

However, removing 'Source Code Pro' from "editor.fontFamily" resolves the problem.

@hidekuro
Copy link

Try re-install font to resolve problem.

In my case, I using "Source Han Code JP".
I saw correct colors after re-install the font.

@bjesuiter
Copy link

For what it's worth, the issue subsided for me when I disabled my custom font settings.

With custom font enabled:
Screen Shot 2020-06-24 at 1 12 43 PM

Without:
Screen Shot 2020-06-24 at 1 12 56 PM

The issue appears to manifest itself with Hasklig in particular. As you can see, Verdana is not problematic (also tried Helvetica):
Screen Shot 2020-06-24 at 1 15 42 PM

Although Hasklig is not a pre-installed system font, I also tried Lexend Deca, which is also custom, and presented no issues rendering color. Reinstalling Hasklig did not alleviate the issue.

Scopes inspector indicates the correct foreground color:
Screen Shot 2020-06-24 at 1 20 02 PM

Thanks for your research, this works great!
I normally use 'Source Code Pro' font, but when I delete it from my font settings, the next font will be used.
The next font is 'Menlo' and since it's installed on my system, it loads just fine.

@LyonUp
Copy link

LyonUp commented Dec 31, 2020

"editor.fontFamily": "Source Code Pro" breaks it too, same problem. Removing the setting works.

I also solved it by installing the "Source Code Pro" font:https://github.com/adobe-fonts/source-code-pro/releases/tag/variable-fonts

@jundl77
Copy link

jundl77 commented Jan 3, 2021

FYI, the fix for Hasklig is to install version 1.2 or later: https://github.com/i-tu/Hasklig/releases/tag/v1.2

@Somesa
Copy link

Somesa commented Apr 17, 2021

Reinstalling 'Source Code Pro' font from google fonts worked for me
Thanks 👍

heussd added a commit to heussd/dotfiles that referenced this issue Apr 29, 2021
@guylyons
Copy link

guylyons commented May 3, 2021

Removing my font choice specification in the settings.json fixed it for me.

@behemos
Copy link

behemos commented Jun 1, 2021

Is there anything close to Source Code Pro which is known to work?
UPDATE: Just downloaded Source Code Pro again from Google Fonts, and overwrote my existing files, seems to work ok now.

👍 https://fonts.google.com/specimen/Source+Code+Pro

@anukul anukul closed this as completed Jun 2, 2021
@blakewatson
Copy link

In case some poor soul has the same problem I did... Source Code Pro was all black in VS Code. No highlighting. I tried re-downloading a newer version of Source Code Pro as suggested above but it didn’t work.

After nearly going mad, I realized that I also had Source Code Pro installed via the Adobe Creative Cloud app and that version of the font was the old broken one. VS Code was preferring the Adobe version. After removing that from Adobe CC and re-installing the latest version of Source Code Pro (and reloading the VS Code window) it works perfectly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
font-rendering Font rendering issues macos-big-sur themes Color theme issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.