Skip to content
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

Cascadia ݿ (U+077F : Arabic Letter Kaf With Two Dots Above) rendering problem in Terminal #17289

Closed
PhMajerus opened this issue May 18, 2024 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@PhMajerus
Copy link

PhMajerus commented May 18, 2024

Windows Terminal version

1.21.1272.0

Windows build number

10.0.22631.3593 x64

Steps to reproduce

Anything that displays the character ݿ:U+077F (Arabic Letter Kaf With Two Dots Above) using Cascadia Mono or Cascadia Code in the Terminal.

echo -e "\n\n\n\n\n\n \u0643 \u077F \n\n\n\n\n\n"

image

It seems to only happen in Terminal, Word does not stretch that glyph:
image
(beware characters order looks reversed because Word shows them RTL)

And this seems to only happen with Cascadia, here is the same terminal with the font changed to Iosevka:
image

And the glyph looks fine in VTT as well:
image

Also, that glyph is a combination of other glyphs, and ك:kaf-ar, which is U+0643, shown alongside in the screenshots and test command, does not get stretched/mirrored.
image

Expected Behavior

The ݿ:U+077F glyph should look like ك:U+0643 with two extra dots above it.

Actual Behavior

The ݿ:U+077F glyph is rendered stretched and mirrored, or corrupt.

@PhMajerus PhMajerus added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 18, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@lhecker
Copy link
Member

lhecker commented May 18, 2024

I've checked this glyph out under a debugger, and this weird shape is what we get back from the Direct2D API. There's no matrix transformation, or any other kind of unusual configuration active when this happens.

I've also found that the issue goes away at a font size of 38pt at 100% display scale (26pt at 150% scale, and so on). This indicates that the issue is with grid fitting, because at very large font sizes glyphs are rendered from their outlines only. And indeed, using DWRITE_RENDERING_MODE_OUTLINE solves the issue.

If you check the rendering in VTT you'll see that it shows the exact same issue if you enable Grid Fit (Ctrl+G):

xtUGubqfjgYygqLz.mp4

@PhMajerus
Copy link
Author

PhMajerus commented May 18, 2024

Thanks for looking into this @lhecker

I just read through Cascadia issues and there seems to have been an issue report related to this: microsoft/cascadia-code#743
I guess there is something wrong with the Arabic glyphs in the font.

@DHowett
Copy link
Member

DHowett commented May 21, 2024

Oh yeah, that's broken. Gonna close this in favor of the one on the Cascadia repo. Thanks!

@DHowett DHowett closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants