macvim-dev / macvim-dev/macvim
Support OpenType features, like discretionary ligatures and stylistic sets
Nessuno ha ancora preso questa issue.
- Lingua principale
- Vim Script
- Stelle
- 7.9k
- Fork
- 691
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Many modern, well-made fonts include "OpenType features" that let you fine-tune typographic settings, like the appearance of 0 (slashed vs. dotted), or single/double story a/g. Like code ligatures, which MacVim already supports, these features can improve code legibility.
Is your feature request related something that is currently hard to do? Please describe.
Currently, it's not possible to enable OpenType features.
Also, not all fonts "provide" ligatures in the same way. Fira Code, for example, uses calt (contextual alternates), while Recursive uses the feature flag dlig. With Recursive, set macligatures doesn't turn on ligatures, suggesting that MacVim only supports calt. If OpenType features were supported, it would be possible to use all typography features a font provides, regardless of implementation.
Describe the solution you'd like
MacVim could provide an option, like macligatures, which takes a comma-separated list of OpenType features to enable. These features are four-letter flags, like dlig and ss01.
set macfontfeatures=dlig,ss01
Additional context
This may be a duplicate of #491, but I'm not sure of the difference between "language tags" as described there, and "OpenType features", which is how these settings are described in font documentation that I've seen.
- Examples of OpenType features:
https://github.com/arrowtype/recursive#opentype-features - Discussion of
caltvsdlig, concluding thatdligfits the OpenType spec better:
https://github.com/arrowtype/recursive/issues/106
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando l’opzione macligatures esistente di MacVim e il punto di ingresso della configurazione dei font. Verifica come dovrebbero essere rappresentati i feature flag come dlig e ss01; il lavoro è completo quando un’impostazione separata da virgole abilita le funzionalità OpenType richieste, comprese quelle implementate in modo diverso da calt.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- macos, vim
- Ambito
- desktop, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100