Skip to content

Unicode: 🖍️ renders but ✏️ fails #223483

Open

Description

@p-i-

Type: Bug

I use VSCode as my goto text-editor these days.

It is vexing that certain "more-common" unicode characters don't render properly, while other "less-common" ones DO.

After several years of waiting for a fix, I'm filing an issue.

See attached screenshot.

VS Code version: Code 1.91.1 (f1e16e1, 2024-07-09T22:07:46.768Z)
OS version: Darwin arm64 23.5.0
Modes:

System Info
Item Value
CPUs Apple M2 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 2
Memory (System) 24.00GB (2.46GB free)
Process Argv --crash-reporter-id f10d97cd-2115-4dba-a34a-07be9312995a
Screen Reader no
VM 0%
Extensions (21)
Extension Author (truncated) Version
dvt-remote-ssh ami 1.0.0
nestedtext bma 2.0.0
githistory don 0.6.20
copilot Git 1.214.1003
copilot-chat Git 0.17.2024062801
vsc-python-indent Kev 1.18.0
rainbow-csv mec 3.12.0
vscode-docker ms- 1.29.1
debugpy ms- 2024.8.0
python ms- 2024.10.0
vscode-pylance ms- 2024.7.1
jupyter ms- 2024.6.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.18
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-containers ms- 0.375.1
remote-ssh ms- 0.112.0
remote-ssh-edit ms- 0.86.0
remote-explorer ms- 0.4.3
yaml-cloudformation-highlighter paq 2.0.4

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
jg8ic977:31013176
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31094925
refactort:31101459
ccplc:31098109
pythonrstrctxt:31093869

Activity

  1. p-i- commented on Jul 24, 2024

    @p-i-
    Author
    Screenshot 2024-07-24 at 11 23 10

    It's rendering the WRONG unicode. I'm entering the big diagonal pencil on the left, and it's rendering the small black horizontal one on the right.

  2. rzhao271 commented on Jul 24, 2024

    @rzhao271
    Collaborator

    Could you paste the left diagonal pencil and the right horizontal pencil into this issue?
    I wonder whether the Unicode representations for the two are the same or not.
    I'm also unable to reproduce the issue on Windows with the font Consolas, "Courier New", monospace after copying the emojis from this issue's title into the Interactive Window:

    Pencil and crayon both rendering in the Interactive Window

  3. added
    info-needed
    on Jul 24, 2024
  4. p-i- commented on Jul 24, 2024

    @p-i-
    Author

    Gosh. Fast response. You lot are great!

    [f"{emoji}: {'+'.join(f'U+{ord(char):04X}' for char in emoji)}"
        for emoji in ['✏️', '📝', '✎', '✐', '✏']]

    Output:

    ['✏️: U+270F+U+FE0F', '📝: U+1F4DD', '✎: U+270E', '✐: U+2710', '✏: U+270F']
    
    Screenshot 2024-07-24 at 17 27 39

    So to summarize:

    • First I inject all 5 'pencil' emojis into VSCode .ipynb: CTRL+CMD+SPACE on my mac brings up EmojiPalette, typing 'pencil' gives 5 results (as per my initial screenshot), I click each one to add these 5 emojis into VSCode
    • I observe that first one (the one I want) renders the same as the last one
    • I paste my list into my ChatGPT Desktop app and now see 5 separate emojis, yay!
    • I execute the notebook cell, giving the result
    • I now paste the code HERE (GitHub issue messagebox), and see that it is the FIRST one that is now repeated in the FIFTH position (i.e. I get 2 NICE yellow pencils with the rubber on the end and 0 shitty black&white_horiz ones)
    • I now take a screenshot and add it to the message, to make sure I am not in fact going insane.

    So,

    • dropping U+270F+U+FE0F and U+270F into VSCode editor, they both render as U+270F, but they're stored correctly, as can be seen from the .ipynb cell output.
    • Copy-Pasting into ChatGPT Desktop, they render properly.
    • But Copy-Pasting them HERE, they now both render as U+270F+U+FE0F!

    AFAICS this suggests at least 2 core fonts on macOS (the one used in Github Issue Messagebox / Chrome / macOS, and VSCode-macOS) are fucked.

  5. p-i- commented on Jul 24, 2024

    @p-i-
    Author

    And the icing on top, if you look at the screenshot you'll see that I get 2 NICE pencils while composing the message, but if you look at the rendered (text) codeblock of my .ipynb cell output you see 2 shitty ones.

    At least that's what I see:

    Screenshot 2024-07-24 at 17 40 50
  6. p-i- commented on Jul 24, 2024

    @p-i-
    Author
    Screenshot 2024-07-24 at 17 43 16

    I don't know whether this is the default setting. It would be really nice if VSCode were to put a star next to any setting that is not the default value.

    fwiw XCode Settings UI handles different levels of configuration settings nicely.

  7. IllusionMH commented on Jul 24, 2024

    @IllusionMH
    Contributor

    VS Code adds border left to modified settings. You can see all modified settings by picking Modified folder in search field. If you have suggestions for settings editor improvements - please file separate feature request.

    Effectively duplicate of #32840

    Check comments for workarounds.
    AFAIK adding explicit emoji font before system fallback should help.

  8. p-i- commented on Jul 24, 2024

    @p-i-
    Author

    Andrii Dieiev (@IllusionMH) Thankyou for pointing me towards this issue.

    Having said, I've spent 20 minutes scrolling that thread and thrashing against editor.fontFamily and am now frustrated to fuck.

    Menlo, Monaco, 'Courier New', monospace, 'Apple Color Emoji' -- no change.
    'Apple Color Emoji', Menlo, Monaco, 'Courier New', monospace -- now I correctly get my ✏️ but everything else is mashed up.

    I don't know the intricacies of font-hierarchy and I don't want to have to learn them to get my IDE to behave right.

    Can ANY dev give me a line that works on macOS?

    And if not, how is this an open problem since Aug 20 2017?

    How can that be? Doesn't this qualify as a serious UX fail? I'm on a mac, trying to use SoTA tooling.

    How come VSCode doesn't work out-of-the-box on MacOS as a unicode-friendly text-editor? It's 2024.

    I'm trying to stay the right side of the "bringing an absurdity to attention" / "behaving like an entitled dick" line. I'm humbly in awe of this product. That's why it hurts so much to experience a very basic and fundamental fail-point that it seems I can do nothing about.

  9. p-i- commented on Jul 24, 2024

    @p-i-
    Author

    Looking through #118905 I tried removing Menlo, and adding 'Apple Color Emoji'.

    So:

    Monaco,  'Apple Color Emoji', 'Courier New', monospace
    

    ... and this works.

    In fact just Monaco, 'Apple Color Emoji', works. Is there any reason for any items following these?

    If this is indeed a universal macOS solution, if VSCode shipped with this as a default setting for macOS, it will save a lot of distributed developer pain and encourage happy thoughts associated with VSCode around the world.

    PS It would be nice to have a test-list of emojis. I've tried a few known problematic ones: ✏️ ⚠️ ☣️ ♻️ ☎️ & all work. ‼️ ⁉️ kinda work (they're white tho', and I think they should be red, but they're white here too as I write).

  10. p-i- commented on Aug 5, 2024

    @p-i-
    Author

    I've just bumped into another confounding Unicode issue:

    ⏺️ ⤴️ 🔄 ⤵️ ↔️ ↕️ ↘️ ↗️ render fine in code-editor and .ipynb-editor (both code-cell and output):

    Screenshot 2024-08-05 at 10 55 02

    However if I hover, 4 render correctly and 4 incorrectly:

    Screenshot 2024-08-05 at 10 53 20

    Shouldn't the 'hover' be using the same font as the code-editor?

    PS Please could someone remove the 'info-needed' tag?

  11. added
    font-rendering
    under-discussion
    and removed
    info-needed
    on Aug 5, 2024
  12. hyrious commented on Oct 18, 2024

    @hyrious
    Contributor

    Update 3: So in summary. The only way to make all 3 emojis render correctly under my setup both on Windows and macOS seems to be:

    I just put the standalone test here: https://hyrious.me/tool/emoji-test

    Update 2: I got the same test on Windows (with the same font Iosevka):

    Image

    Update 1: It seems to have something with the used font itself, and it behaves differently in Chrome and VS Code. 🤨 Sometimes the default font settings can display all emoji characters. But after a reload it doesn't. (Note: all screenshots below are tested on macOS.)

    DefaultIosevkaIosevka w/o default

    Image

    Image

    Image

    Original obsolete test.

    I can reproduce the rendering result on a macOS Chrome with font Menlo, which happens to be the default monospace font stack on macOS. It behaves as a fallback to user-setting fonts so it cannot be disabled without touching vscode internal files.

    The reproduction:

    <body style="font-family: Iosevka, Menlo">Unicode: 🖍️ renders but ✏️ fails</body>
    <!-- Delete 'Menlo' and it becomes correct! -->

    Don't know if there's similar issue on Windows.

  13. starball5 commented on Mar 1, 2025

    @starball5

    Yes, U+FE0F (variation selector 16) is what you're looking for (probably). I don't see how this is a VS Code issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

font-renderingunder-discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions