Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Built-in terminal has incorrect advance width for lots of ideographic, emoji, and non-spacing-mark characters #251102

Open
Assignees
Tyriar
Milestone
@davidje13

Description

@davidje13

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.100.3
  • OS Version: macOS 15.5

Steps to Reproduce:

  1. Open the integrated VSCode terminal;
  2. Enter (e.g.)echo 'a\U01f6d6z' orecho 'a\U01fae0z';
  3. Notice that the emoji only advances 1 cell, but occupies 2 cells, causing it to overlap the followingz character.

Most emoji are recognised as 2 cells, but it seems many are not, including several which have already been around for many versions of Unicode. Yet these are all already recognised by V8's RegExp with\p{Basic_Emoji}.

A similar issue also applies to Ideographic characters (matching\p{Ideographic}) which VSCode does not recognise (e.g.echo 'a\U016fe4z') - they are rendered as a single cell replacement character and advance 1 cell, but officially should all be wide and occupy 2 cells.

There are also issues with newer non-spacing combining characters (matching\p{Mn}) such asecho 'a\u0897z'. Again these are not recognised and render as a single cell replacement character with 1 cell advance, but officially should have an advance of 0.

In total I have found 809 characters in these groups which appear to have incorrect advance widths. All of these characters use the correct advance width when using the macOS built-in terminal program (except\u{016fe4} for some reason, which has an advance width of 0 despite being classified as ideographic this character is classed as both non-spacing markand ideographic, so non-spacing mark takes priority).

These inconsistencies cause issues when writing console applications, where it can be important to know the advance width which will be applied to a character to know if line wrapping will occur.

Ideally VSCode would use the\p{Basic_Emoji},\p{Ideographic}, and\p{Mn} character properties to determine advance widths of characters to ensure it stays somewhat up-to-date with the latest Unicode definitions. It may also be necessary to review the advance widths of characters outside these ranges, though they are less trivial to give definitive "correct" values for.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp