-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text layout code is expecting the quantity of glyphs is equal to the cells allocated for each line #3546
Comments
Running the following script in Node.JS shows a lot of problems in current text layout code: console.log(`
Combining Diacritics | [a\u0300\u0304]
Polytonic Greek | [ᾊ] [Α\u0313\u0300\u0345]
Ideographic Variation | [東京都葛\u{E0101}飾区] [奈良県葛\u{E0100}城市]
Composite Hangul | [\u1100\u116A\u11B3]
Combining Dakuten | [か\u309A]
Emoji vs Text | [\u2602] [\u2602\uFE0E] [\u2602\uFE0F]
Emoji | [\u{1F469}]
Emoji with Skin Tone | [\u{1F469}\u{1F3FB}]
Emoji Variation and ZWJ | [\u{1F469}\u{1F3FB}\u200D\u{1F4BB}]
`) |
Possibly also #2191 |
@skyline75489 my hero |
@DHowett-MSFT my man. I'm seeing regression on current master 306e751 |
@skyline75489 Thanks for the report! I'm going to move that regression to it's own thread (#3553), considering you've narrowed the regression down to a particular commit. Broadly our text rendering needs help with M chars->N glyphs scenarios like this issue describes, but we probably shouldn't have things getting worse on us. |
This is heavily related to this issue: #780 |
@skyline75489 So what's wrong with
And to provide a proper text layout, cells should...
|
@reli-msft Gotta admit, the whole Unicode experience is harder to fix than I initially anticipated. I'm not sure the exact plan Console team have. But I'm positive that we are heading to the right direction. |
@skyline75489 Let me count all the features that a proper rich text box should support:
And what they can choose to support:
|
You know, with the completion of #16916 I believe we've finally cracked this nut. |
The issue is found in
CustomTextLayout
:Instead of carefully process the
clusters
input,CustomTextLayout
drops nearly all the information fromclusters
, and only keeping how many columns a cluster occupy, and later it is expecting that the glyph quantity equals to the quantity of clusters. This may lead to incorrect rendering result for many cases (complex script, ligatures, etc.)Bug #610, #696 may be caused by this.
The text was updated successfully, but these errors were encountered: