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

Some ligatures are missing in various editors (Emacs, Atom, Idea) #280

Closed
andreyorst opened this issue Jul 22, 2020 · 4 comments
Closed
Labels

Comments

@andreyorst
Copy link

Hello, thanks for this great font!

I've noticed that not all ligatures, listed on official page are working though. I was able to reproduce this issue with two text editors. First was Emacs, with HarfBuzz, and auto-composition-mode, with these settings:

(when (aorst/font-installed-p "JetBrainsMono")
  (let ((ligatures `((?-  ,(regexp-opt '("-|" "-~" "---" "-<<" "-<" "--" "->" "->>" "-->")))
                     (?/  ,(regexp-opt '("/**" "/*" "///" "/=" "/==" "/>" "//")))
                     (?*  ,(regexp-opt '("*>" "***" "*/")))
                     (?<  ,(regexp-opt '("<-" "<<-" "<=>" "<=" "<|" "<||" "<|||" "<|>" "<:" "<>" "<-<"
                                           "<<<" "<==" "<<=" "<=<" "<==>" "<-|" "<<" "<~>" "<=|" "<~~" "<~"
                                           "<$>" "<$" "<+>" "<+" "</>" "</" "<*" "<*>" "<->" "<!--")))
                     (?:  ,(regexp-opt '(":>" ":<" ":::" "::" ":?" ":?>" ":=" "::=")))
                     (?=  ,(regexp-opt '("=>>" "==>" "=/=" "=!=" "=>" "===" "=:=" "==")))
                     (?!  ,(regexp-opt '("!==" "!!" "!=")))
                     (?>  ,(regexp-opt '(">]" ">:" ">>-" ">>=" ">=>" ">>>" ">-" ">=")))
                     (?&  ,(regexp-opt '("&&&" "&&")))
                     (?|  ,(regexp-opt '("|||>" "||>" "|>" "|]" "|}" "|=>" "|->" "|=" "||-" "|-" "||=" "||")))
                     (?.  ,(regexp-opt '(".." ".?" ".=" ".-" "..<" "...")))
                     (?+  ,(regexp-opt '("+++" "+>" "++")))
                     (?\[ ,(regexp-opt '("[||]" "[<" "[|")))
                     (?\{ ,(regexp-opt '("{|")))
                     (?\? ,(regexp-opt '("??" "?." "?=" "?:")))
                     (?#  ,(regexp-opt '("####" "###" "#[" "#{" "#=" "#!" "#:" "#_(" "#_" "#?" "#(" "##")))
                     (?\; ,(regexp-opt '(";;")))
                     (?_  ,(regexp-opt '("_|_" "__")))
                     (?\\ ,(regexp-opt '("\\" "\\/")))
                     (?~  ,(regexp-opt '("~~" "~~>" "~>" "~=" "~-" "~@")))
                     (?$  ,(regexp-opt '("$>")))
                     (?^  ,(regexp-opt '("^=")))
                     (?\] ,(regexp-opt '("]#"))))))
    (dolist (char-regexp ligatures)
      (apply (lambda (char regexp) (set-char-table-range
                                    composition-function-table
                                    char `([,regexp 0 font-shape-gstring])))
             char-regexp))))

You can see, that most ligatures work, but not all: [off] / [on] (you can toggle between tabs with images to see what changes and what not). Mainly, there are four missing ligatures: ~=, \, \/, and /**

Atom editor also has this issue:

image

I was unable to set up VSCode ligatures, as their interface is unfumiliar.

In Intellij Idea Community Edition ligatures partly work:

image

Again, no \, and \/

@philippnurullin
Copy link
Member

Hi @andreyorst .
The /\ \/ was removed because of this issue #78 (comment)
The /** was removied beacuse of this #88
~= was removed after this request #204
In IDEA JetBrains Mono is bundled with an older version, so some ligature alterations is not applied.

We are currently working on page update. We will remove all the irrelevant ligatures. Thanks for the feedback!

@andreyorst
Copy link
Author

Ah, okay!

Should I close this now, or you'll close it after page update?

@philippnurullin
Copy link
Member

Worry not, i will close this when we update the page.

@philippnurullin
Copy link
Member

The page was updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants