Closed mateusfccp closed 7 months ago
It looks like harfbuzz and cairo support for macOS is rather recent. Last I looked into it about a year ago it was not possible.
However emacs-plus supports it as of 6 weeks ago, so I'll try and get support added to build-emacs-for-macos here this weekend :)
Yes, at first I thought that it was not supported, but then I saw this issue from emacs-plus
. I don't know, however, what has to be done.
I'll try and get support added to build-emacs-for-macos here this weekend :)
Thanks!
Actually, it seems harfbuzz and cairo support has been removed from emacs-plus as it turns out they yield no advantage over macOS's own CoreText renderer, which is why upstream emacs itself does not support it on macOS. More details here: https://github.com/d12frosted/homebrew-emacs-plus/pull/371#issuecomment-881976323
As such, I don't think there's much point in porting over the now removed patch from emacs-plus. @mateusfccp please let me know if you would still like the ability to try harfbuzz and cairo on macOS out of curiosity, cause then I'm happy to spend the 5-10 minutes required to get it working :)
@jimeh My main use-case for this is to enable font ligatures, which, AFAIK, is not supported through CoreText, but I may be wrong...
Well, reading the comment you linked, the author seems to be able to enable ligatures without Harfbuzz, although I have no idea how.
Yeah, indeed. I've never tried using ligatures myself. I'll give it a go this weekend and see what I can find :)
@mateusfccp @jimeh FYI, I just tested using ligatures via ligature.el with the latest Emacs master and Emacs 28 builds from emacs-builds and it works fine without any additional steps, though the rendering isn't quite perfect, at least with the latest Fira Code font.
ligature-mode
disabled:
ligature-mode
enabled:
@schellj Neat, I never got around to testing it myself. But I'm gonna try and get a number of outstanding things resolved over the next few weeks, so I'm gonna try ligatures myself. And I'll also try and get a build with harfbuzz/cairo and see how it compares.
@schellj Thanks! I am almost sure I did try ligatures.el
before but it didn't work. I am going to give it another try!
FWIW, it looks like the non-perfect rendering of the ligatures in my previous comment may just be due to that particular font (Fira Code). JetBrains Mono does a better job (e.g., you can't see where characters have been merged in spaceship (<=>
), fat comma (=>
) and arrow (->
)):
I am using
build-emacs-for-macos
for a while and it's really nice.However, I didn't manage to compile with Cairo and Harfbuzz. They should be default, but even if I explicitly pass
--with-harfbuzz
and--with-cairo
toconfigFlags
it won't be compiled with them.How may I compile with Harfbuzz and Cairo?