Skip to content

Commit 066de9d

Browse files
committed
Make SF Symbols double-width
macOS 11 (Big Sur) has added SF Symbols support for the OS. While these are primarily designed to be used in apps as images, each symbol does indeed correspond to a Unicode entry and can be used alongside normal texts in a text editor, similar to how emojis work. Since they tend to be pretty square in shape, we should treat them as double-width like emojis. The Unicode range was extracted by using Apple's SF Symbols app, and copying out all the symbols and inspecting them. It will likely need to be updated if Apple adds more symbols in future updates. For now, they all seem to occupy the low end of Supplementary Private Use Area-B. Note that these symbols only work when viewed in macOS, and won't work in other platforms like Linux or Windows. They should probably not be used in files that need to be shared outside of macOS.
1 parent 60e6568 commit 066de9d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/mbyte.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,15 @@ utf_char2cells(int c)
15451545
{0x1f6e9, 0x1f6e9},
15461546
{0x1f6f0, 0x1f6f0},
15471547
{0x1f6f3, 0x1f6f3}
1548+
#ifdef FEAT_GUI_MACVIM
1549+
// Include SF Symbols characters, which should be rendered as
1550+
// double-width. All of them are in the Supplementary Private Use Area-B
1551+
// range. The exact range was determined by downloading the "SF Symbols"
1552+
// app from Apple, and then selecting all symbols, copying them out, and
1553+
// inspecting the unicode values of them.
1554+
,
1555+
{0x100000, 0x100d7f}
1556+
#endif
15481557
};
15491558

15501559
if (c >= 0x100)

0 commit comments

Comments
 (0)