macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.53k stars 685 forks source link

macligatures no longer works #1183

Closed s4y closed 3 years ago

s4y commented 3 years ago

As of recently, set macligatures no longer seems to work.

Steps to reproduce:

  1. Set a font with obvious ligatures, like Fira Code.
  2. set macligatures
  3. Look at a source file with combinations of characters like ==.

As far as I can tell, this stopped working sometime after dba6293677e0633917e3054cfddec1293e5ab3fb but I haven't been able to narrow it down yet (if I git bisect, some of the changes in between don't build).

eirnym commented 3 years ago

In my vimrc I have test for fonts and ligatures and in build 170 I see no problems with use Core Text renderer option enabled or not.

With this Core Text option disabled I have a few warnings in terminal, which looks like this:

2021-03-31 16:01:50.057 MacVim[58949:1698743] CoreText note: Client requested name ".HelveticaNeueDeskInterface-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].

Related part of my vimrc:

    set macligatures
    set antialias
    set guifont=Fira\ Code\ Light:h12
        " Font test
        " ≄
        " a != b  <-- ligature test
        " Some languages:
        " Привет гостям! <-- Russian test
        " Cześć  <-- Polish test
        " γεια  <-- Greek chars
        " 暗示するより明示するほうがいい。 <--Japanese chars
        "                                     (Beautiful is better than ugly)
        " *a **abc) ***abc
        " ++a a---
        " www != ^= ~= ~@
        " *ptr 9:45 0xff
        " <*> <|||>>>
        " <~> <~~ --> === =:=
        " <+> ?? #{  #_ #_( ?= ^=
        " PowerLine:
        "  ro=, ws=☲, lnr=☰, mlnr=, br=, nx=Ɇ, crypt=🔒
        "  ro=⊝, ws=☲, lnr=☰, mlnr=㏑, br=ᚠ, nx=Ɇ, crypt=🔒
        "     
        " Emoji: 😀😂🙃

PS: Japanese test was copied from internet (a Zen of python translation) and please let me know if it has mistakes

ychin commented 3 years ago

Also seems to work for me. I tried both the latest released version (r170) and latest commit from master, and they both seem to work (using Fira Code as well).

Do you have more specific examples, @s4y? Standard questions:

s4y commented 3 years ago

I'm sorry for the hasty report! This was with my local development copy and a clean build fixed it. In the future I won't skip the standard questions/steps.