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

Text stroke is not fully displayed after v7 #8860

Closed
Redgeioz opened this issue Nov 18, 2022 · 4 comments · Fixed by #8906
Closed

Text stroke is not fully displayed after v7 #8860

Redgeioz opened this issue Nov 18, 2022 · 4 comments · Fixed by #8906
Labels
🕷 Bug Verified that it’s actually a legit bug that exists in the current release.

Comments

@Redgeioz
Copy link

Expected Behavior

image

Current Behavior

image

Steps to Reproduce

https://www.pixiplayground.com/#/edit/Nc4-XqFejJ_Yefndcogxj

Environment

  • pixi.js version: above 7.0.0
  • Browser & Version: Chrome 106.0.5249.119 & Edge 106.0.1370.47 & Firefox 106.0
  • OS & Version: Windows 10
@SuperSodaSea SuperSodaSea added the 🕷 Bug Verified that it’s actually a legit bug that exists in the current release. label Nov 18, 2022
@SuperSodaSea
Copy link
Member

It seems to be caused by #8501:

- if (!Text.nextLineHeightBehavior || lineHeight - fontProperties.fontSize < 0)
+ if (lineHeight - fontProperties.fontSize < 0)

let linePositionYShift = (lineHeight - fontProperties.fontSize) / 2;
if (lineHeight - fontProperties.fontSize < 0)
{
linePositionYShift = 0;
}

Removing the if and directly set linePositionYShift to 0 can get the correct result.

@bigtimebuddy Do you have any idea?

@bigtimebuddy
Copy link
Member

This is also an issue in 6.5.x if nextLineHeightBehavior is enabled:
https://www.pixiplayground.com/#/edit/dOhIpfXlsJMAo2TPKvFkK

Workaround is to use padding:
https://www.pixiplayground.com/#/edit/Suh_Op__2Hdf7vnt5bwG7

This seems like a bug. We should be accounting for the stroke width for the canvas height.

@bigtimebuddy
Copy link
Member

This as introduce here #7386

@Thugwife1111

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕷 Bug Verified that it’s actually a legit bug that exists in the current release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants