macvim-dev / macvim

Vim - the text editor - for macOS
https://macvim.org
Vim License
7.51k stars 683 forks source link

opentype language tags for core text renderer #491

Open nilsbecker opened 7 years ago

nilsbecker commented 7 years ago

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.

nilsbecker commented 7 years ago

apple documentation: https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6ltag.html