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

Font rendering issues with ligatures enabled #2135

Closed
Eugeny opened this issue May 27, 2019 · 16 comments
Closed

Font rendering issues with ligatures enabled #2135

Eugeny opened this issue May 27, 2019 · 16 comments
Labels
type/bug Something is misbehaving

Comments

@Eugeny
Copy link
Member

Eugeny commented May 27, 2019

image

Compare font weight for a and a-.

The font is Fira Code.

@Eugeny
Copy link
Member Author

Eugeny commented May 27, 2019

Strangely enough, this only happens with -, but not =, although both can form a ligature.

@Tyriar
Copy link
Member

Tyriar commented May 27, 2019

What version of xterm.js? Is this in Terminus?

@Tyriar
Copy link
Member

Tyriar commented May 27, 2019

Also what rendererType are you using?

@Eugeny
Copy link
Member Author

Eugeny commented May 27, 2019

Sorry - it's xterm 3.13.2, with canvas renderer. You should be able to see it live by grabbing the latest Terminus build.

This behaviour seems to be new in the 3.13.x series.

@jerch
Copy link
Member

jerch commented May 28, 2019

Cant repro this either with your latest terminus build. Font weight is right for me (tested with echo -e '\x1b[1m a= a- ==' and echo -e '\x1b[0m a= a- ==').

@Eugeny
Copy link
Member Author

Eugeny commented May 29, 2019

This doesn't happen on Windows for me either - only macOS seems to be affected

@Tyriar
Copy link
Member

Tyriar commented May 29, 2019

I can't get ligatures to work?

Screen Shot 2019-05-29 at 4 37 26 PM

Screen Shot 2019-05-29 at 4 37 37 PM

@Eugeny
Copy link
Member Author

Eugeny commented May 30, 2019

Not even after restarting the app?

@Tyriar
Copy link
Member

Tyriar commented May 30, 2019

@Eugeny oh that did it.

Cannot repro 😕

Screen Shot 2019-05-30 at 8 32 41 AM

@Eugeny
Copy link
Member Author

Eugeny commented May 30, 2019

I'm seeing the difference in brightness of a in a= and a- on the bottom line

@Tyriar
Copy link
Member

Tyriar commented May 30, 2019

Oh I see

@Tyriar
Copy link
Member

Tyriar commented May 30, 2019

They both seem to be drawing with the same properties. Below logs ctx.font, ctx.fillStyle, ctx.textBaseline, chars, x, y

Screen Shot 2019-05-30 at 9 58 18 AM

@Eugeny
Copy link
Member Author

Eugeny commented May 30, 2019

It somewhat looks like the fatter A is just being rendered twice, and the overdraw results in a wider outline where it's antialiased

@Tyriar
Copy link
Member

Tyriar commented May 30, 2019

Hmm, maybe we are somehow drawing things wrong normally and the char joiner one is doing it right. I've seem comments that regular text rendering is more heavy than it should be 🤔

@Tyriar Tyriar removed this from the 3.14.0 milestone May 30, 2019
@Eugeny
Copy link
Member Author

Eugeny commented Jun 3, 2019

Can confirm that this doesn't happen with the webgl renderer (all characters seem to be drawn extra-bold there)

@Tyriar
Copy link
Member

Tyriar commented Oct 7, 2019

Closing as won't fix since we want to phase the canvas renderer out in favor of webgl and dom only

@Tyriar Tyriar closed this as completed Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

3 participants