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

anchorY="bottom-baseline" not working since v0.48.0 #309

Closed
ffdead opened this issue Apr 9, 2024 · 2 comments
Closed

anchorY="bottom-baseline" not working since v0.48.0 #309

ffdead opened this issue Apr 9, 2024 · 2 comments

Comments

@ffdead
Copy link

ffdead commented Apr 9, 2024

Seems like something changed between v0.47.2 and v0.48.0 related to how the bottom-baseline is calculated.

I noticed this when updating from @react-three/[email protected] which has ([email protected] as a dependency) to @react-three/[email protected] which has [email protected] as a dependency.

By manually overriding the troika dependincy using the resolutions field in package.json is was able to track down that this happened in v0.48.0

  <Text
        fontSize={scale}
        sdfGlyphSize={128}
        font={font.path}
        anchorY="bottom-baseline" 
        lineHeight={1}
  />

v0.47.2
Screenshot 2024-04-09 at 16 32 08

v0.48.0
Screenshot 2024-04-09 at 16 32 53

@lojjic lojjic closed this as completed in 3457b03 Apr 9, 2024
@lojjic
Copy link
Collaborator

lojjic commented Apr 9, 2024

Thanks! I'd missed a negative sign. 🤦‍♂️ I've published 0.49.1 with the fix.

@ffdead
Copy link
Author

ffdead commented Apr 10, 2024

Amazing, thank you @lojjic - I can confirm it works 🎉

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

2 participants