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

Terminal Rendering Defect #231

Open
ghost opened this issue May 19, 2022 · 11 comments
Open

Terminal Rendering Defect #231

ghost opened this issue May 19, 2022 · 11 comments

Comments

@ghost
Copy link

ghost commented May 19, 2022

Hi,

I work on CodeEdit and there's a terminal rendering defect. We use SwiftTerm as the package for our terminal emulator

Click here to see the issue and please comment on it as soon as you can.

@ghost ghost changed the title Terminal Rendering Defect in CodeEdit Terminal Rendering Defect May 19, 2022
@austincondiff
Copy link

To provide some context:

image

  • The bottom line seems to extend further than it should.
  • Vertical alignment of characters is slightly off in comparison to Terminal.app
  • Resizing the window causes artifacts

Expected behavior:

image

@migueldeicaza
Copy link
Owner

Hello,

The bottom of the screen issue has been fixed recently, this is a topic of debate between me anr Marcin, he likes one visual style, and I like the other. I might introduce a flag to control that, so we can both be happy,but for now, the code in the repository should match your expectation.

Can you provide a simple script that would render the unaligned text, so I can take a look?

@migueldeicaza
Copy link
Owner

OMG I did not know about CodeEdit - this is incredible! I love what I see!

@austincondiff
Copy link

austincondiff commented May 23, 2022

Thank you! Spread the word, we have big plans for it. We always appreciate more contributors if you'd care to help out as this is a community led effort! 😉

@austincondiff
Copy link

austincondiff commented May 23, 2022

By misaligned text I am referring to the following...
image

The triangles and half circles are not in alignment to characters with a background color in between.

Terminal.app is sightly out of alignment in the opposite direction.

image

@migueldeicaza
Copy link
Owner

Could you get the original poster to share the tool he uses to produce that prompt, so I can try to repro locally?

@austincondiff
Copy link

austincondiff commented May 25, 2022

He was commenting on a lot of our issues for a few days, changed his username, and then a day later he just deleted his account (why you see ghost as the username).
image

I use powerlevel10k for zsh to get this prompt shown above.

@austincondiff
Copy link

Any progress on this issue? Have you been able to reproduce this?

@migueldeicaza
Copy link
Owner

I have not had a chance to look at it.

Generally, I think we have the right size for the rows, as computed by this:

image

But I suspect that I might be missing something, a similar challenge (for Chinese display) is that I do not call CTRunGetPositions, and that might be one of the missing parts of the puzzle, see this issue:

#227

(And somewhat related, CTRunGetAdvances)

@austincondiff
Copy link

@migueldeicaza I see, thanks for the insight!

cc/ @bombardier200

@krzyzanowskim
Copy link
Contributor

this is a topic of debate between me anr Marcin

I still think you're wrong about it. It looks bad with configureNativeColors() with a white background behind it. I'm not sure why the last row (not full) has to be drawn like that. peace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants