[vim/vim] Add SF Symbols to double-wide emoji list for macOS (#8077)

73 views
Skip to first unread message

Yee Cheng Chin

unread,
Apr 6, 2021, 4:55:14 PM4/6/21
to vim/vim, Subscribed

Only do this for macOS because they would not render correctly outside of Apple ecosystem anyway as these are private symbols and not standardized under Unicode.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/8077

Commit Summary

  • Add SF Symbols to double-wide emoji list for macOS

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot]

unread,
Apr 6, 2021, 4:57:24 PM4/6/21
to vim/vim, Subscribed

Codecov Report

Merging #8077 (bf930fc) into master (c9605f0) will decrease coverage by 86.85%.
The diff coverage is n/a.

Current head bf930fc differs from pull request most recent head cb5feec. Consider uploading reports for the commit cb5feec to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@

##           master    #8077       +/-   ##

===========================================

- Coverage   89.33%    2.47%   -86.86%     

===========================================

  Files         148      146        -2     

  Lines      166047   160891     -5156     

===========================================

- Hits       148335     3990   -144345     

- Misses      17712   156901   +139189     
Flag Coverage Δ
huge-clang-none ?
huge-gcc-none ?
huge-gcc-testgui ?
huge-gcc-unittests 2.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/mbyte.c 18.29% <ø> (-61.79%) ⬇️
src/sha256.c 0.00% <0.00%> (-97.96%) ⬇️
src/digraph.c 0.00% <0.00%> (-97.78%) ⬇️
src/gui_gtk_f.c 0.00% <0.00%> (-97.54%) ⬇️
src/match.c 0.00% <0.00%> (-97.13%) ⬇️
src/crypt_zip.c 0.00% <0.00%> (-97.06%) ⬇️
src/evalbuffer.c 0.00% <0.00%> (-96.83%) ⬇️
src/debugger.c 0.00% <0.00%> (-96.62%) ⬇️
src/libvterm/src/rect.h 0.00% <0.00%> (-96.56%) ⬇️
src/textprop.c 0.00% <0.00%> (-96.41%) ⬇️
... and 135 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9605f0...cb5feec. Read the comment docs.

Yee Cheng Chin

unread,
Apr 6, 2021, 4:58:38 PM4/6/21
to vim/vim, Subscribed

Just for context, Apple introduced a list of symbols called SF Symbols. It was previously for iOS only and then added to macOS 11 (Big Sur) (see documentation).

The symbols are primarily designed to be loaded through APIs by doing something like this in code:[NSImage imageWithSystemSymbolName:@"paintbrush" accessibilityDescription:nil]], which will load the "paintbrush" symbol. However, the symbols are also available to be used in-place with other text as Unicode, but Apple is using a private symbol range for them, kind of similar to say how https://fontawesome.com/ works.

This change adds support for those list of symbols and show them as double-wide as otherwise they would look a little weird. Only do this on Apple platforms as they won't render anyway in other OSes. I also couldn't find an official list of unicode range, and I just copied all the symbols out from the builtin SF Symbols app in macOS and inspected the values.

Yee Cheng Chin

unread,
Apr 6, 2021, 5:00:53 PM4/6/21
to vim/vim, Subscribed

This is what it looks like before/after the change:

Before (using macOS Terminal):

image

After (using macOS Terminal):

image

The text I used for this (you can only see them if you are using latest macOS or iOS devices):

􀈂􀈃􀈄􀈅􀈆􀈇􀈈􀈉􀈊􀈋􀈌􀈍􀈎􀈏􀓨􀤑􀦇􀈐􀒋􀉥􀉦􀉧􀧚􀓩􀣳􀈑􀈒􀈓􀈔􀜧􀜨􀈕􀈖􀈗􀈘􀈙􀈚􀈛􀈜􀧆􀧇􀈝􀈞􀣕􀣖􀣍􀣎􀤰􀤱􀬔
􀬕􀈟􀈠􀈡􀈢􀈣􀈤􀒌􀒍􀈥􀈦􀈧􀈨􀈩􀈪􀈫􀈬􀤂􀤃􀩎􀩒􀩏􀩓􀩐􀩔􀩑􀩕􀩬􀩭􀪹􀪺􀩮􀩯􀤜􀤝􀥾􀨪􀤄􀤅􀨤􀨥􀈭􀈮􀈯􀈰􀈱􀈲􀈳􀈴􀈵
􀈶􀈷􀈸􀈹􀈺􀣗􀣘􀩚􀩛􀩴􀩵􀢍􀢎􀈻􀈼􀈽􀈾􀈿􀉀􀤧􀉁􀉂􀉃􀫵􀫶􀫷􀉄􀉅􀦊􀉆􀥨􀉇􀦋􀳼􀳽􀥜􀦌􀩳􀩼􀪏􀕹􀧵􀓕􀣙􀉉􀒎􀒏􀉊􀉋􀧞
􀮝􀉌􀉍􀉎􀉏􀰚􀰛􀰜􀰝􀉐􀉑􀉒􀉓􀰞􀰟􀰠􀰡􀉔􀉕􀉖􀉗􀰢􀰣􀰤􀰥􀉘􀒐􀰦􀰧􀉙􀒑􀰨􀰩􀉚􀉛􀉜􀉝􀤦􀥅􀬒􀬓􀤞􀤟􀫕􀫖􀫗􀫘􀤠􀤡􀉞
􀉟􀉠􀉡􀟍􀟎􀛯􀫓􀫔􀪃􀪄􀉢􀒔􀒕􀢏􀒖􀥪􀉣􀒠􀒡􀥕􀉤􀉨􀉩􀉪􀯑􀯒􀯓􀯧􀯨􀯩􀓣􀓤􀜕􀜖􀜗􀜘􀪼􀪽􀉫􀉬􀠃􀠄􀝊􀝋􀉭􀉮􀉯􀉰􀉱􀉲
􀉳􀉴􀉵􀉶􀭽􀭾􀉷􀉸􀉹􀉺􀏻􀏼􀓥􀓦􀦎􀦏􀆔􀩿􀪀􀪁􀪂􀆕􀆖􀆗􀆘􀆙􀆚􀆛􀆜􀆝􀆞􀆡􀆢􀆧􀯆􀣨􀜚􀪒􀆨􀥣􀥤􀥥􀥦􀯝􀝯􀆪􀤆􀆫􀆬􀆭
􀆮􀆱􀆲􀆳􀆴􀆵􀆶􀆷􀆸􀆹􀆺􀆻􀆼􀖃􀆽􀆾􀫸􀆿􀇀􀇁􀇂􀇃􀇄􀇅􀇆􀇇􀇈􀇉􀇊􀇋􀇌􀇍􀇎􀇏􀇐􀇑􀇒􀇓􀇞􀇟􀇔􀇕􀇖􀇗􀇘􀇙􀇚􀇛􀇜􀇝
􀇠􀇡􀇢􀇣􀇤􀇦􀇥􀇧􀇨􀇩􀇪􀦜􀇫􀇬􀴾􀴿􀵀􀙕􀙖􀙬􀙭􀇭􀇮􀇯􀇱􀇲􀇰􀫌􀭅􀮐􀭆􀭇􀭈􀯪􀱢􀫍􀣠􀣡􀮴􀇳􀫒􀓖􀣭􀞹􀞺􀇴􀚅􀇵􀚇􀇶
􀚸􀛝􀛞􀚹􀚺􀛟􀛠􀚻􀚼􀛡􀛢􀣺

Yee Cheng Chin

unread,
Apr 6, 2021, 5:05:12 PM4/6/21
to vim/vim, Subscribed

This change is mostly ported from MacVim. I'm not sure how Vim would want to support private system-native symbols like this but I doubt this range will be used for other purposes now that Apple claimed it, so thought I would see if there is interest to merge.

Bram Moolenaar

unread,
Apr 7, 2021, 12:59:34 PM4/7/21
to vim/vim, Subscribed

I do not see a disadvantage in including this, so let's just include it.

Bram Moolenaar

unread,
Apr 7, 2021, 1:01:18 PM4/7/21
to vim/vim, Subscribed

Closed #8077 via 8dddc1f.

Reply all
Reply to author
Forward
0 new messages