refactor!(ligatures): use ligature.el for Emacs28+

Include ligature.el in a new set-font-ligatures! function, so that
"normal" (read: "font-based") ligatures can
also be controlled on a per-major mode basis from a user function
in configuration.

This commit also drops support for Emacs 27 to reduce the maintenance
burden.

BREAKING CHANGE: font ligatures for Harfbuzz/Coretext composition
table-based ligations are no longer controlled with
`+ligatures-composition-alist`, but is handled with
`+ligatures-prog-mode-list` and `+ligatures-all-modes-list` for most
common cases. See the README for the mode-specific methods

BREAKING CHANGE: the `:ui ligatures` module will not work anymore
with Emacs 27 or older. Also, there is no need to keep patched fonts
(for Fira, Hasklig, Iosevka) if you use the module. Update Emacs if
you want to keep using ligatures, or disable the module (`doom doctor`
will tell you if your current version of Emacs stopped working with
the module)
This commit is contained in:
Gerry Agbobada 2021-05-23 11:27:57 +02:00 committed by Henrik Lissner
parent a44e8d6bfd
commit 46d7404bef
10 changed files with 200 additions and 916 deletions

View file

@ -0,0 +1,5 @@
(when (and (or (featurep 'ns)
(string-match-p "HARFBUZZ" system-configuration-features))
(featurep 'composite))
(package! ligature
:pin "0e5d0a8554622bcb0ec634e364795650ff4f2457"))