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 rendering on macOS 10.14 is still too thin on Electron v4.x #19970

Closed
3 tasks done
lexi-lambda opened this issue Aug 27, 2019 · 2 comments
Closed
3 tasks done

Font rendering on macOS 10.14 is still too thin on Electron v4.x #19970

lexi-lambda opened this issue Aug 27, 2019 · 2 comments

Comments

@lexi-lambda
Copy link

lexi-lambda commented Aug 27, 2019

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • v4.2.9
  • Operating System:
    • macOS 10.14.5
  • Last Known Working Electron version:
    • N/A

Expected Behavior

Versions of Electron other than 4.x include a fix for font rendering on macOS 10.14. Here’s what things are supposed to look like, rendered using Electron v6.0.4:

Screen Shot 2019-08-26 at 20 25 06

Electron v3.1.13 is not quite as good, but it still looks fine:

Screen Shot 2019-08-26 at 20 25 54

Actual Behavior

On Electron v4.2.9, however, font rendering is much too thin:

Screen Shot 2019-08-26 at 20 24 10

Yikes!

To Reproduce

I’ve set up a repository with the above minimal example. To reproduce the issue, run the following commands on a machine running macOS 10.14:

$ git clone git@github.com:lexi-lambda/electron-4.x-font-smoothing-repro.git
$ cd electron-4.x-font-smoothing-repro
$ npm install
$ npm start

Additional Information

The original issue for this bug was #14948, and supposedly it was backported to 4.x in #17737. However, as various people have reported in microsoft/vscode#59887 (comment) and #17737 (comment), the issue is still present as of Electron v4.2.9.

@miniak
Copy link
Contributor

miniak commented Oct 27, 2019

Electron 4 is not supported anymore, this bug is not present in Electron 5+
https://electronjs.org/blog/electron-7-0#end-of-support-for-4xy

@miniak miniak closed this as completed Oct 27, 2019
@miniak
Copy link
Contributor

miniak commented Oct 27, 2019

The problem is that https://skia-review.googlesource.com/c/skia/+/157566 wasn't back-ported properly. This is missing:

diff --git a/third_party/skia/src/ports/SkFontHost_mac.cpp b/third_party/skia/src/ports/SkFontHost_mac.cpp
index 8be3f306c1b8b1bf6609d14798860ca763f824b1..48dbf2f51d03d03863f948cdfc1aaa2dee008b29 100644
--- a/third_party/skia/src/ports/SkFontHost_mac.cpp
+++ b/third_party/skia/src/ports/SkFontHost_mac.cpp
@@ -440,6 +440,9 @@ static SmoothBehavior smooth_behavior() {
                 if (r != g || r != b) {
                     return SmoothBehavior::subpixel;
                 }
+                if (noSmoothBitmap[x][y] != smoothPixel) {
+                    smoothBehavior = SmoothBehavior::some;
+                }
             }
         }
         return smoothBehavior;

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

3 participants