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

Source Code Pro No Color #3747

Closed
wbond opened this issue Nov 13, 2020 · 4 comments
Closed

Source Code Pro No Color #3747

wbond opened this issue Nov 13, 2020 · 4 comments

Comments

@wbond
Copy link
Member

wbond commented Nov 13, 2020

Description

A user reported losing highlighting with source code pro on macOS 11.

Steps to reproduce

  1. Install latest Source Code Pro
  2. Open a source file

Expected behavior

Syntax highlighted code.

Actual behavior

No syntax highlighting.

Environment

  • Build: 4090
  • Operating system and version: macOS 11
@wbond
Copy link
Member Author

wbond commented Nov 13, 2020

The issue seems to be that newer versions of the font include some SVG/color glyphs.

Currently we detect if a font is a color font via CTFontGetSymbolicTraits() and see if it has kCTFontColorGlyphsTrait. It looks like we'll need to do that, and then check each glyph looking to see if there is an outline. If there isn't, it is a color glyph. If there is an outline, it is a normal glyph. CTFontCreatePathForGlyph() appears to be how to see if there is an "outline".

References:

@BenjaminSchaaf
Copy link
Member

Right as I start to look into this they release a new version of Source Code Pro with the SVGs stripped: https://github.com/adobe-fonts/source-code-pro/releases/tag/2.032R-ro%2F1.052R-it%2F1.012R-VAR 😆

@wbond
Copy link
Member Author

wbond commented Nov 19, 2020

We should have a fix for this as part of our next dev build

@BenjaminSchaaf
Copy link
Member

Fixed in build 4094.

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

2 participants