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

Disable font ligatures for lookahead/lookbehind prefixes (regex) #126

Closed
andrebrait opened this issue Feb 6, 2020 · 1 comment
Closed
Labels
enhancement New feature or request
Milestone

Comments

@andrebrait
Copy link

While this was a recent development in Fira Code, I think it's something they did right and maybe should also be implemented here (all screenshots are from JetBrains Mono 1.0.2).

  • FiraCode in IntelliJ IDEA in a Java file:
    Fira-IDEA-Java

  • JetBrains Mono in IntelliJ IDEA in a Java file:
    JetBrains-IDEA-Java

  • FiraCode in IntelliJ IDEA in a Python file:
    Fira-IDEA-Python

  • JetBrains Mono in IntelliJ IDEA in a Python file:
    JetBrains-IDEA-Python

Sometimes, the ligature used is different depending on the text editor, too:

  • FiraCode in Visual Studio Code in a Plain Text file (identical results in a Shell Script file):
    Fira-VSCode-Text

  • JetBrains Mono in Visual Studio Code in a Plain Text file (identical results in a Shell Script file):
    JetBrains-VSCode-Text

Other times, both end up using ligatures, though different ones, depending on the text editor, too (and maybe this is an issue with IntelliJ?):

  • FiraCode in IntelliJ IDEA in a Shell Script file:
    Fira-IDEA-Shell

  • JetBrains Mono in IntelliJ IDEA in a Shell Script file:
    JetBrains-IDEA-Shell

See tonsky/FiraCode#578 for more details on what Fira Code did in this case.

From their changelog:

Disabled ligatures after regexp lookahead/lookbehinds (?<=< (?<=> (?<==> (?<=| (?<== (?=:= (?=!= (?== (?=== (?==> (?=> (?=>> (?=<< (?=/= (?!! (?!!. (?!= (?!== (?<!! (?<!!. (?<!= (?<!== (?<!--

@philippnurullin
Copy link
Member

@andrebrait Looks interesting! Thanks, we will include it in future updates.

@philippnurullin philippnurullin added the enhancement New feature or request label Feb 10, 2020
@philippnurullin philippnurullin added this to the v2.002 milestone Jul 16, 2020
@philippnurullin philippnurullin modified the milestones: v2.200, v2.3000 Oct 16, 2020
philippnurullin added a commit that referenced this issue Dec 21, 2020
- Removed `.-` ligature #76
- Disabled ligatures for lookahead/lookbehind prefixes (regex) #126
- Added support for combined marks #228
- Added `∪` #244
- Added `➜`(U+279C), `✗`(U+2717), and `✓`(U+2713) #246
- Added `<<~` #291
- Added `‾` Overline #298
- Tuned Cyrillic `в` #335
- Increase BoxDraving. Top +100, bottom +100 #382
- Added `‿` `∁` `∎` `⊸` `⊎` `⨀` `⨆` `∩` `∶` `⊢` `⊤` `⊥` `⊛` `⊖` `⊗` `⊙` `⊕` `◦` `⋆` `ℚ` `ℤ` `slashshortcomb`
- Corrected placement of bar in italic `Đ`
- Polished Digits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants