macvim-dev / macvim-dev/macvim

opentype language tags for core text renderer

Open
#491 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
Vim Script
Stars
7.9k
Forks
691
PR merge metrics
No merged PRs in 30d

Description

apparently the Core text renderer supports activating language tags in advanced opentype fonts, https://en.wikipedia.org/wiki/Apple_Advanced_Typography

the iosevka font implements fancy ligatures on a per-programming-language basis using these language tags.
https://github.com/be5invis/Iosevka/issues/56
(see also the README of this repo for examples)
the atom editor supports this via the use of custom stylesheets afaiu.

i find this a saner solution than enabling a fixed set of ligatures globally for a gui font, since the set of ligatures that make sense depends on the programming language. for example, is <= an arrow or a comparison operator? does |> have a special meaning in the language? etc.

so, feature request: could MacVim allow setting language tags for the Core Text renderer in opentype gui fonts? ideally this would be a new setting that can be put into a filetype-specific autocommand.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating MacVim's Core Text renderer and the GUI font-setting entry points mentioned by the request. Trace how a filetype-specific autocommand could provide OpenType language tags, and confirm the expected behavior with the Iosevka examples and linked references. Done means a documented setting can apply language tags per file type in Core Text fonts.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, vim
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.