JetBrainsMono icon indicating copy to clipboard operation
JetBrainsMono copied to clipboard

Ligatures + git diffs

Open gf3 opened this issue 2 years ago • 5 comments

i don't know enough about building fonts to know if this is correctable, however when ligatures are enabled git diff separators appear a little unnatural:

Emacs payments.go – Doom Emacs 2022-04-19 at 11.20.46

<<<<<<< HEAD
=======
	"github.com/kamva/mgm/v3"
	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo"

	"freshline.io/octograph/pkg/graph/model"

>>>>>>> 2130ba83a (add payment on client)

gf3 avatar Apr 19 '22 15:04 gf3

Which version are you using? I'm using 2.242 and it looks fine for me, as in the ligatures are disabled when there's more than three < or = following each other.

trygveaa avatar Apr 19 '22 16:04 trygveaa

@trygveaa i'm using the latest release from the website as of last week. and i'm using it with emacs without any special font configuration or settings:

(font-spec :family "JetBrains Mono" :size 14 :weight 'light :height 1.3)

gf3 avatar Apr 19 '22 16:04 gf3

Hi @gf3 . I'm unable to reproduce this issue in 2.242.

To make sure you have this version please

  • delete manually all version of JB Mono from OS.
  • perform clean install from here https://github.com/JetBrains/JetBrainsMono/releases/tag/v2.242

philippnurullin avatar Apr 20 '22 09:04 philippnurullin

@philippnurullin i did as requested and i'm still experiencing the issue. however after some testing i believe my editor is somehow forcing ligatures because when i disabled all language features it appears correctly:

GIF

gf3 avatar Apr 20 '22 18:04 gf3

Hi again @gf3 . The code for ligature consists from simple rules. There is a rule that breaks the ligature in certain conditions. Looks like this part of the instructions is not working in emacs case. The possible solutions I see are:

  • Use JetBrains Mono NL. This is version of the font without ligatures.
  • Use this guid to ligature support in emacs https://github.com/mickeynp/ligature.el. You can find the list of ligatures here https://github.com/JetBrains/JetBrainsMono/wiki/List-of-supported-symbols. Also you can choose which ligatures you want to work. So simple exclusion of >>> & <<< from the list will solve the issue.

philippnurullin avatar Apr 25 '22 09:04 philippnurullin