]> granicus.if.org Git - vim/commitdiff
patch 8.2.2731: Mac: SF symbols are not displayed properly v8.2.2731
authorBram Moolenaar <Bram@vim.org>
Wed, 7 Apr 2021 17:00:25 +0000 (19:00 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 7 Apr 2021 17:00:25 +0000 (19:00 +0200)
Problem:    Mac: SF symbols are not displayed properly.
Solution:   Add custom range to list of double-width characters. (Yee Cheng
            Chin, closes #8077)

src/mbyte.c
src/version.c

index 079e0d2b43641790a63188301d2885c5740da062..e3d64ba01b511e42ec438e6f7083a69b3f1d4038 100644 (file)
@@ -1545,6 +1545,15 @@ utf_char2cells(int c)
        {0x1f6e9, 0x1f6e9},
        {0x1f6f0, 0x1f6f0},
        {0x1f6f3, 0x1f6f3}
+
+#ifdef MACOS_X
+       // Include SF Symbols characters, which should be rendered as
+       // double-width. All of them are in the Supplementary Private Use
+       // Area-B range. The exact range was determined by downloading the "SF
+       // Symbols" app from Apple, and then selecting all symbols, copying
+       // them out, and inspecting the unicode values of them.
+       , {0x100000, 0x100d7f}
+#endif
     };
 
     if (c >= 0x100)
index 5850872fbf9ca844a8df4834df46cc82cd407a0c..7a865de2a116a74168ef26e976b96d1a01af00af 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2731,
 /**/
     2730,
 /**/