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

Character Variants don't work for Zed (Commit Mono font) #11486

Closed
1 task done
arjpar opened this issue May 7, 2024 · 4 comments · Fixed by #11611
Closed
1 task done

Character Variants don't work for Zed (Commit Mono font) #11486

arjpar opened this issue May 7, 2024 · 4 comments · Fixed by #11611
Labels
defect [core label] font Font feedback for readability, size, style, etc setting Feedback for preferences, configuration, etc

Comments

@arjpar
Copy link

arjpar commented May 7, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Description: character variants don't seem to work on Zed (tested using the Commit Mono font but other fonts are probably affected). Stylistic sets work, but character variants don't.

  1. Open Zed
  2. Go to Settings
  3. Ensure that "CommitMono" is used as the value for "buffer_font_family"
  4. Ensure that character variants are being used in "buffer_font_features", example:>
// [...] other settings above
  "buffer_font_features": {
    "cv06": true,
    "cv07": true,
    "cv08": true
  },
// [...] other settings below

Environment

Zed: v0.133.7 (Zed)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

What the font looks like in Zed (character variants not being applied):
image

What the font is supposed to look like:
(Italics shown in the image to show what italics are supposed to look like)
image

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@arjpar arjpar added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels May 7, 2024
@Moshyfawn Moshyfawn added setting Feedback for preferences, configuration, etc font Font feedback for readability, size, style, etc and removed triage Maintainer needs to classify the issue labels May 8, 2024
@JunkuiZhang
Copy link
Contributor

JunkuiZhang commented May 8, 2024

Edit:
This is the expected behavior of zed on macOS, as the current impl on macOS only supports a limited set of font features. Currently, the impl on Windows supports all font features.

For the features supported, see here:

Zed supports a subset of OpenType features that can be enabled or disabled for a given buffer or terminal font. The following OpenType features can be enabled or disabled too: calt, case, cpsp, frac, liga, onum, ordn, pnum, ss01, ss02, ss03, ss04, ss05, ss06, ss07, ss08, ss09, ss10, ss11, ss12, ss13, ss14, ss15, ss16, ss17, ss18, ss19, ss20, subs, sups, swsh, titl, tnum, zero.

@arjpar
Copy link
Author

arjpar commented May 8, 2024

@JunkuiZhang macOS very much supports the character variants I was trying to enable. Those character variants work in every other editor I've tried (VSCode, WezTerm, Helix, etc). Are you saying its a limitation of Zed, or a limitation of macOS?

@JunkuiZhang
Copy link
Contributor

Sorry for the confusion. I was referring to Zed, of course. Currently, Zed's implementation on macOS only includes these font features.

@JunkuiZhang
Copy link
Contributor

You can try #11611

@JosephTLyons JosephTLyons removed the admin read Pending admin review label May 9, 2024
osiewicz pushed a commit that referenced this issue May 15, 2024
This PR brings support for all `OpenType` font features to
`macOS(v10.10+)`. Now, both `Windows`(with #10756 ) and `macOS` support
all font features.

Due to my limited familiarity with the APIs on macOS, I believe I have
made sure to call `CFRelease` on all variables where it should be
called.

Close #11486 , and I think the official website's
[documentation](https://zed.dev/docs/configuring-zed) can be updated
after merging this PR.

> Zed supports a subset of OpenType features that can be enabled or
disabled for a given buffer or terminal font. The following OpenType
features can be enabled or disabled too: calt, case, cpsp, frac, liga,
onum, ordn, pnum, ss01, ss02, ss03, ss04, ss05, ss06, ss07, ss08, ss09,
ss10, ss11, ss12, ss13, ss14, ss15, ss16, ss17, ss18, ss19, ss20, subs,
sups, swsh, titl, tnum, zero.



https://github.com/zed-industries/zed/assets/14981363/44e503f9-1496-4746-bc7d-20878c6f8a93



Release Notes:

- Added support for **all** `OpenType` font features to macOS.
osiewicz pushed a commit to RemcoSmitsDev/zed that referenced this issue May 18, 2024
This PR brings support for all `OpenType` font features to
`macOS(v10.10+)`. Now, both `Windows`(with zed-industries#10756 ) and `macOS` support
all font features.

Due to my limited familiarity with the APIs on macOS, I believe I have
made sure to call `CFRelease` on all variables where it should be
called.

Close zed-industries#11486 , and I think the official website's
[documentation](https://zed.dev/docs/configuring-zed) can be updated
after merging this PR.

> Zed supports a subset of OpenType features that can be enabled or
disabled for a given buffer or terminal font. The following OpenType
features can be enabled or disabled too: calt, case, cpsp, frac, liga,
onum, ordn, pnum, ss01, ss02, ss03, ss04, ss05, ss06, ss07, ss08, ss09,
ss10, ss11, ss12, ss13, ss14, ss15, ss16, ss17, ss18, ss19, ss20, subs,
sups, swsh, titl, tnum, zero.



https://github.com/zed-industries/zed/assets/14981363/44e503f9-1496-4746-bc7d-20878c6f8a93



Release Notes:

- Added support for **all** `OpenType` font features to macOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] font Font feedback for readability, size, style, etc setting Feedback for preferences, configuration, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants