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

SCP cannot be styled in various apps (e.g. Sublime Text, VSCode) on macOS 11 (Big Sur) #250

Closed
thekeith opened this issue Oct 10, 2020 · 25 comments

Comments

@thekeith
Copy link

For some reason, Source Code Pro is now incompatible with some apps on Big Sur such as Sublime Text 3. Removing and reinstalling the font did not help. Also raising this to the Sublime HQ team too.

@frankrolf
Copy link
Member

Hi @thekeith, would you mind providing some more detail here?

  • what does “now incompatible” mean? The fonts no longer work after installing 10.15?
  • “some apps” – which apps?
  • have you tried OTF versions?
  • are you using the latest static release? https://github.com/adobe-fonts/source-code-pro/releases/tag/2.030R-ro%2F1.050R-it
  • are you perhaps accidentally using Variable Fonts, which may not yet be supported by Sublime Text?
  • “Also raising this to the Sublime HQ team too” – where?

@UnderpantsGnome
Copy link

@frankrolf I don't know if they are referring to the same issue, but on Big Sur, using VS Code, the font doesn't render any color other than black, so syntax highlight no longer works, I just checked it with the latest release of the TTF fonts.

@balupton
Copy link

balupton commented Nov 13, 2020

Issue is also reported on vscode microsoft/vscode#100840 as well as chromium https://bugs.chromium.org/p/chromium/issues/detail?id=1100502

Hasklig also has the same issue.

@balupton
Copy link

Perhaps #244 is the same issue, just detected earlier somewhere else.

@Soulike
Copy link

Soulike commented Nov 13, 2020

Same problem on Chrome 86
image
image

@monadbobo
Copy link

Issue is also reported on vscode microsoft/vscode#100840 as well as chromium https://bugs.chromium.org/p/chromium/issues/detail?id=1100502

Hasklig also has the same issue.

I had the same problem.

@frankrolf
Copy link
Member

frankrolf commented Nov 13, 2020

#244 is not related, since this is just a CSS issue – I just tested the site (fixed yesterday) and it works fine.
However, I think it is the same problem as #217, where Firefox would have this problem even in OSs prior to Big Sur.

Explanation: Source Code Pro contains an experimental SVG table with colored glyphs in them:
Screen Shot 2020-11-13 at 10 42 17

Apparently, the presence of this table confuses environments into thinking “Hey – this font is already colored! I should not touch it.” Pre-macOS 11 this only happened in Firefox, now it does in more applications; I am unsure where the bug lies though (stock apps don’t seem to have a problem with coloring the font).
The root cause however is the presence of the SVG table.


To test this hypothesis, I made a small test in Sublime:

Other font (Input Mono)
Screen Shot 2020-11-13 at 10 24 35

Source Code Pro (2.030)
Screen Shot 2020-11-13 at 10 24 41

Source Code Pro (SVG table removed)
Screen Shot 2020-11-13 at 10 35 30

@pauldhunt is currently working on SCP and can decide whether keeping the SVG table is worth the tradeoff.

FWIW I did test with OTF files, the file format does not seem to matter much in this bug. I will update the issue title accordingly.

@frankrolf frankrolf changed the title TTF is incompatible with apps like Sublime Text on Big Sur SCP cannot be styled in various apps (e.g. Sublime Text, VSCode) on macOS 11 (Big Sur) Nov 13, 2020
@zavan
Copy link

zavan commented Nov 13, 2020

@frankrolf @pauldhunt now with the final version of Big Sur released this problem potentially affects many more people. Have you made a decision on keeping the table and breaking compatibility vs removing it?

Since it was described as a "experimental" feature (and the fact that it breaks compatibility with other stable software), in my view it shouldn't make into what end users receive. One option would be to make two separate releases, one with the table, another without, or a making a "canary" release channel with experimental features while keeping them out of the regular one, like Google Chrome does.

@pauldhunt
Copy link
Contributor

I’m planning on getting a patch out ASAP that removes the SVG table in hopes that will remedy this behavior. If you’d like to test some beta fonts, please contact me. Thanks.

@wbond
Copy link

wbond commented Nov 13, 2020

We are tracking this for Sublime Text at sublimehq/sublime_text#3747. I've outlined what I believe to be the correct changes if you are using Core Text. I have not made the changes to our font rendering stack yet.

@pauldhunt
Copy link
Contributor

I’ve pushed out a new build of the fonts with SVG table removed to remedy this bug. Please update your fonts and let me know if this resolves the issue for you. Thanks.
📦 https://github.com/adobe-fonts/source-code-pro/releases/latest

@jakedahn
Copy link

For what it's worth, I can confirm that the latest release you linked above fixes VSCode! I had to restart VSCode after reinstalling the font, but everything seems to be working for me -- thank you! 🥳

@manngo
Copy link

manngo commented Nov 17, 2020

I had the same problem with Atom and Firefox, which led me to conclude that it was the font and not the software.

Thanks @thekeith for reporting this, and @pauldhunt for fixing it.

@mattrose
Copy link

mattrose commented Nov 17, 2020

@pauldhunt I maintain the source-code-pro package on Fedora Linux, and I'm just wondering whether this new release has any known impact on anything other than MacOS. Just wondering if it's worth packaging for Linux.

@frankrolf
Copy link
Member

@mattrose #217 (font color assignment in Firefox) might be worth testing for.

@mattrose
Copy link

I looked at #217 and it didn't seem to affect anything but Macs (the bug states that Windows is OK)

livecodepanos added a commit to livecode/livecode-ide that referenced this issue Nov 19, 2020
This patch ensures the script colorization is preserved on Big Sur
when using the default (Source Code Pro) script editor font, This bug
occured because of an experimental offending "SVG table with colored glyphs"
included in the font (adobe-fonts/source-code-pro#250).
This patch replaces the existing Source Code Pro ttf files with a newer version
that does not suffer from this bug,
livecodepanos added a commit to livecode/livecode-ide that referenced this issue Nov 19, 2020
This patch ensures the script colorization is preserved on Big Sur
when using the default (Source Code Pro) script editor font. This bug
occured because of an experimental offending "SVG table with colored glyphs"
included in the font (adobe-fonts/source-code-pro#250).
This patch replaces the existing Source Code Pro ttf files with a newer version
that does not suffer from this bug.
@thekeith
Copy link
Author

Accidentally closed the bug when making a reply.

@thekeith thekeith reopened this Nov 19, 2020
@thekeith
Copy link
Author

@frankrolf more details:

what does “now incompatible” mean? The fonts no longer work after installing 10.15?

As noted in other tickets, colors were not properly rendering in Sublime Text and other code editors

“some apps” – which apps?

Sublime Text, Atom

have you tried OTF versions?

I tried the Google Font version just now and that fixed the issue. No downloaded releases from GitHub worked.

are you using the latest static release? https://github.com/adobe-fonts/source-code-pro/releases/tag/2.030R-ro%2F1.050R-it

Yes

are you perhaps accidentally using Variable Fonts, which may not yet be supported by Sublime Text?

Nope

“Also raising this to the Sublime HQ team too” – where?

I mean I also sent to the Sublime Text team to raise the issue in case it was related to the app.

Thanks all for the help on this.

@frankrolf
Copy link
Member

@thekeith
There has been a new release since you filed this issue. May I ask you to check out https://github.com/adobe-fonts/source-code-pro/releases/tag/2.032R-ro%2F1.052R-it%2F1.012R-VAR ?
Thanks!

pkq added a commit to pkq/Hasklig that referenced this issue Dec 17, 2020
Remove the (experimental) SVG table to enable color-coded text on macOS Big Sur (Issue i-tu#123), following the approach implemented in upstream Source Code Pro (adobe-fonts/source-code-pro#255). See upstream issue (adobe-fonts/source-code-pro#250) for additional details.

Refactor build.sh to be more robust, consistent with revisions to upstream code
@pauldhunt pauldhunt added the fixed label Jan 6, 2021
@ddarbyson
Copy link

I also see colour-syntax not working in Sublime Text 3 under Big Sur when "font_face": "Source Code Pro" is defined in settings. I didn't have issue in Catalina.

@pauldhunt
Copy link
Contributor

@ddarbyson which version of the Source Code fonts are you using? This issue should have been resolved in the latest builds.

@ddarbyson
Copy link

ddarbyson commented Apr 30, 2021

@pauldhunt I installed Big Sur and font-source-code-pro on Wednesday (April 28th, 2021). Here's the info

$ brew info font-source-code-pro
font-source-code-pro: latest
https://fonts.google.com/specimen/Source+Code+Pro
/usr/local/Caskroom/font-source-code-pro/latest (17 files, 11.2KB)
From: https://github.com/Homebrew/homebrew-cask-fonts/blob/HEAD/Casks/font-source-code-pro.rb
==> Name
Source Code Pro
==> Description
None
==> Artifacts
SourceCodePro-SemiBoldItalic.ttf (Font)
SourceCodePro-BlackItalic.ttf (Font)
SourceCodePro-Bold.ttf (Font)
SourceCodePro-BoldItalic.ttf (Font)
SourceCodePro-ExtraLight.ttf (Font)
SourceCodePro-ExtraLightItalic.ttf (Font)
SourceCodePro-Italic.ttf (Font)
SourceCodePro-Light.ttf (Font)
SourceCodePro-LightItalic.ttf (Font)
SourceCodePro-Medium.ttf (Font)
SourceCodePro-MediumItalic.ttf (Font)
SourceCodePro-Regular.ttf (Font)
SourceCodePro-SemiBold.ttf (Font)
SourceCodePro-Black.ttf (Font)

My co-worker also installed Big Sur (a couple months ago). He is having zero issues. So somewhere along the line we had a regression. Here is his version which works fine in ST3:

https://github.com/adobe-fonts/source-code-pro
/usr/local/Caskroom/font-source-code-pro/2.038R-ro-1.058R-it-1.018R-VAR (101 files, 6.2MB)
From: https://github.com/Homebrew/homebrew-cask-fonts/blob/HEAD/Casks/font-source-code-pro.rb
==> Name
Source Code Pro
==> Description
None
==> Artifacts
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/VAR/SourceCodeVariable-Roman.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-BlackIt.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-Bold.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-BoldIt.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-ExtraLight.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-ExtraLightIt.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-It.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-Light.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-LightIt.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-Medium.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-MediumIt.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-Regular.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-Semibold.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-SemiboldIt.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/VAR/SourceCodeVariable-Italic.otf (Font)
source-code-pro-2.038R-ro-1.058R-it-1.018R-VAR/OTF/SourceCodePro-Black.otf (Font)

@pauldhunt
Copy link
Contributor

@ddarbyson i can see the font version numbers on your colleague’s report, but not on yours. can you tell me what version of the fonts you are using?

@ddarbyson
Copy link

Hey @pauldhunt how do I find that? The output is from brew info and it shows "/usr/local/Caskroom/font-source-code-pro/latest" for my version.

@frankrolf
Copy link
Member

frankrolf commented May 5, 2021

I don’t know who maintains the brew install for Source Code Pro, but it seems it points to Google Fonts for the binaries:
https://github.com/Homebrew/homebrew-cask-fonts/blob/master/Casks/font-source-code-pro.rb

The version available on Google Fonts might not be the latest.

Edit: indeed
google/fonts#3346

wincent added a commit to wincent/wincent that referenced this issue Jul 2, 2021
As described here:

    adobe-fonts/source-code-pro#250

On Big Sur, many apps, including Chrome, get confused by the SVG table
in the font, causing them to assume the font is colored and ignoring
whatever color is defined in the CSS. So, when the sun goes down and the
system flips to dark mode, the text turns black (on a dark background),
making it basically unreadable.

* vendor/fonts/source-code-pro 235b72fc43...29fdb884c6 (4):
  > Update package.json
  > Source Code Pro, version 2038 (roman), version 1.058 (italic), version 1,018 (variable)— Updates all font files
  > Source Code Pro: Roman 2.032, Italic 1.052, VAR 1.012 Updates all font format to remove SVG table.
  > Merge pull request #243 from wincent/executable-bit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests