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

canvas renderer double underline is a single underline #4476

Closed
jerch opened this issue Apr 12, 2023 · 4 comments · Fixed by #4648
Closed

canvas renderer double underline is a single underline #4476

jerch opened this issue Apr 12, 2023 · 4 comments · Fixed by #4648
Assignees
Milestone

Comments

@jerch
Copy link
Member

jerch commented Apr 12, 2023

Not sure if this is linked to the other canvas underline issues, but the curly underline does not look very curly to me:

image

(Get the same output in Chrome && Firefox...)

Edit: Oh well, double is also not doubled 🙈

@jerch jerch added type/bug Something is misbehaving area/addon/canvas labels Apr 12, 2023
@jerch jerch changed the title canvas renderer and curly canvas renderer underline issues Apr 12, 2023
@Tyriar
Copy link
Member

Tyriar commented May 24, 2023

Curly is a general problem tracked here: #4064

The double underline is canvas-specific as no row can draw in another row by design, so the only way we could handle that is to draw the underline upwards instead of downwards.

@Tyriar Tyriar changed the title canvas renderer underline issues canvas renderer double underline is a single underline May 24, 2023
@Tyriar
Copy link
Member

Tyriar commented May 24, 2023

Suggested fix is to configure the texture atlas to avoid drawing below or above bounds of the cell which would then tweak the values of yTop and yBot here:

switch (this._workAttributeData.extended.underlineStyle) {
case UnderlineStyle.DOUBLE:
this._tmpCtx.moveTo(xChLeft, yTop);
this._tmpCtx.lineTo(xChRight, yTop);
this._tmpCtx.moveTo(xChLeft, yBot);
this._tmpCtx.lineTo(xChRight, yBot);
break;

@tisilent
Copy link
Contributor

tisilent commented Aug 1, 2023

try try

@Tyriar
Copy link
Member

Tyriar commented Aug 9, 2023

Actually the muted curly is different to being cut off on canvas, created #4653

@Tyriar Tyriar added this to the 5.3.0 milestone Aug 9, 2023
@Tyriar Tyriar self-assigned this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants