macvim-dev / macvim-dev/macvim
Support OpenType features, like discretionary ligatures and stylistic sets
まだ誰も着手していません。
- 主要言語
- Vim Script
- スター
- 7.9k
- フォーク
- 691
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、MacVim に既存の macligatures オプションと、フォント設定のエントリーポイントを見つけます。dlig や ss01 のような feature flag をどのように表現すべきかを確認します。カンマ区切りの設定によって、要求された OpenType features(calt とは異なる方法で実装されている features を含む)が有効になることを完了条件とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- macos, vim
- 領域
- desktop, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100