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 ligatures can't be disabled #1670

Open
sh2sg opened this issue Jul 11, 2024 · 4 comments
Open

Font ligatures can't be disabled #1670

sh2sg opened this issue Jul 11, 2024 · 4 comments
Assignees
Labels
better to fix unwanted behaviors better to fix  matter issues caused by bugs by Apple

Comments

@sh2sg
Copy link

sh2sg commented Jul 11, 2024

Description

Ligatures can't be disabled.

To Reproduce

  1. Go to 'Settings / Appearance'.
  2. Choose a font that supports ligatures, like "JetBrains Mono".
  3. Disable the "Ligatures" option.
  4. The ligatures are still visible.
Screenshot 2024-07-11 at 22 50 26

Expected behavior

Ligatures efforts should be disabled.

CotEditor version

4.8.7

macOS version

14.5

Additional context

No response

@sh2sg sh2sg added the potential bug issues not yet tested label Jul 11, 2024
@1024jp 1024jp added bug somethings work not correctly and removed potential bug issues not yet tested labels Jul 15, 2024
@1024jp 1024jp self-assigned this Jul 15, 2024
@1024jp 1024jp added this to the 4.8.8 milestone Jul 15, 2024
@1024jp 1024jp added the  matter issues caused by bugs by Apple label Jul 17, 2024
@1024jp 1024jp removed this from the 4.8.8 milestone Jul 17, 2024
@1024jp
Copy link
Member

1024jp commented Jul 17, 2024

Thank you for the report.
I looked into it and found this is a bug on the Apple side within the framework used by CotEditor.

The ligature option in CotEditor works with most fonts (such as Baskerville) while does not work with some specific fonts like JetBrains Mono or Fira Code.
TextKit 2, the successor to the text framework used by CotEditor, seems to have solved this problem, but unfortunately, there are still high barriers that prevent CotEditor from migrating to TextKit 2.
So, I feel CotEditor can nothing for this issue at the moment.

I have reported it to Apple: FB14352598. Let's hope Apple will fix it.

Sample

A test app I made to check this issue. The first line, "fi," is Baskerville and the second line, "==>," is JetBrains Mono.

Screen.Recording.2024-07-17.at.17.23.50.mov

@1024jp 1024jp added better to fix unwanted behaviors better to fix and removed bug somethings work not correctly labels Jul 17, 2024
@sh2sg
Copy link
Author

sh2sg commented Jul 17, 2024

I doubt Apple will provide support for TextKit 1. Anyway, thanks for checking. Maybe I should stick with the ligature efforts or choose another font.

@1024jp
Copy link
Member

1024jp commented Jul 17, 2024

I doubt Apple will provide support for TextKit 1.

Haha, in fact, that's what I think too.
I'll migrate to TextKit 2 one day, but not now.

@sh2sg
Copy link
Author

sh2sg commented Jul 18, 2024

I just realized that JetBrains Mono also offers a non-ligature version... I am happy user again.
https://github.com/JetBrains/JetBrainsMono/releases/tag/v2.304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
better to fix unwanted behaviors better to fix  matter issues caused by bugs by Apple
Development

No branches or pull requests

2 participants