mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-14 08:21:27 -04:00
Add font ligature rendering support
Add tweak.ligatures option (default: no) for OpenType liga/calt rendering with programming fonts. Ligatures are render-only — the grid and copy/paste are unchanged. Uses fcft_rasterize_shaped_run() to shape full runs with HarfBuzz and render each glyph by its shaped glyph ID, correctly handling contextual alternates and ligatures. Block cursor over a ligature uses a pixman gradient as composite source for single-pass correct-color rendering.
This commit is contained in:
parent
c291194a4e
commit
ade745f303
4 changed files with 599 additions and 19 deletions
|
|
@ -1964,6 +1964,21 @@ any of these options.
|
|||
|
||||
Default: _yes_
|
||||
|
||||
*ligatures*
|
||||
Boolean. When enabled, foot renders font ligatures —
|
||||
multi-character sequences like ->, =>, !=, <= that
|
||||
programming fonts (Fira Code, JetBrains Mono, Cascadia Code,
|
||||
etc.) display as combined glyphs.
|
||||
|
||||
Ligatures are purely visual — copy/paste always preserves
|
||||
the original individual characters.
|
||||
|
||||
Requires a font with ligature tables and fcft compiled with
|
||||
HarfBuzz support. Has no visible effect with fonts that do
|
||||
not define ligatures.
|
||||
|
||||
Default: _no_
|
||||
|
||||
*grapheme-width-method*
|
||||
Selects which method to use when calculating the width
|
||||
(i.e. number of columns) of a grapheme cluster. One of
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue