Ligature support
Description
This patch adds proper drawing of ligatures.
The code uses Harfbuzz library to transform original text of a single line to a list of glyphs with ligatures included.
Example
Taken with Fira Code Regular 14pt:
Notes
- The patch adds additional dependency on Harfbuzz library and headers.
- Original patch was made for vanilla version of ST from latest master commit. It is not 100% compatible with Scrollback and Alpha patches, so I made modified versions that you can apply on top of a Scrollback and/or Alpha patch.
- Due to some limitations in drawing engine, ligatures will break when crossing colors, font styles or selection. They will still render properly as separate symbols, just not as ligatures.
- Since 0.8.4 patch, there's now a way to enable additional font rendering features. Look into
features
array inhb.c
for details.
Boxdraw
- The original patch does not work very well with the boxdraw patch. Since it requires some additional changes in the code to make ligatures compatible with boxdraw, a special version of the patch was added, that you can apply on top of the boxdraw patch.
- It does not include Alpha or Scrollback patches.
Download
0.9.2:
- st-ligatures-0.9.2
- st-ligatures-scrollback-0.9.2
- st-ligatures-scrollback-ringbuffer-0.9.2
- st-ligatures-alpha-0.9.2
- st-ligatures-alpha-scrollback-0.9.2
- st-ligatures-alpha-scrollback-ringbuffer-0.9.2
- st-ligatures-boxdraw-0.9.2
0.9:
- st-ligatures-0.9
- st-ligatures-scrollback-0.9
- st-ligatures-scrollback-ringbuffer-0.9
- st-ligatures-alpha-0.9
- st-ligatures-alpha-scrollback-0.9
- st-ligatures-alpha-scrollback-ringbuffer-0.9
- st-ligatures-boxdraw-0.9
0.8.4:
- st-ligatures-0.8.4
- st-ligatures-scrollback-0.8.4
- st-ligatures-alpha-0.8.4
- st-ligatures-alpha-scrollback-0.8.4
- st-ligatures-boxdraw-0.8.4
0.8.3:
- st-ligatures-0.8.3
- st-ligatures-scrollback-0.8.3
- st-ligatures-alpha-0.8.3
- st-ligatures-alpha-scrollback-0.8.3
- st-ligatures-boxdraw-0.8.3
0.8.2-28ad288:
- st-ligatures
- st-ligatures-scrollback
- st-ligatures-alpha
- st-ligatures-alpha-scrollback
- st-ligatures-boxdraw
Authors
- Alexander Rogachev - https://github.com/cog1to