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 truncated when setLetterSpacing is used #6915

Closed
monteiz opened this issue Oct 5, 2024 · 2 comments
Closed

Text truncated when setLetterSpacing is used #6915

monteiz opened this issue Oct 5, 2024 · 2 comments

Comments

@monteiz
Copy link
Contributor

monteiz commented Oct 5, 2024

Version

  • Phaser Version: 3.85.2
  • Operating system: MacOS
  • Browser: Chrome and Safari show the same issue

Description

The "Y" of "PLAY" is truncated when setLetterSpacing is used.

Example Test Code

class Example extends Phaser.Scene
{
    create ()
    {
        this.add.text(20, 20, 'PLAY',{
				fontSize: "10rem",
				fontFamily: "Roboto Condensed, sans-serif-condensed",
				fontStyle: "bold",
			}).setColor('#ffffff');

        this.add.text(20, 200, 'PLAY',{
				fontSize: "10rem",
				fontFamily: "Roboto Condensed, sans-serif-condensed",
				fontStyle: "bold",
			}).setColor('#ffffff').setLetterSpacing(70);
    }
}

const config = {
    type: Phaser.AUTO,
    width: 800,
    height: 600,
    parent: 'phaser-example',
    scene: Example
};

const game = new Phaser.Game(config);
@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

@monteiz
Copy link
Contributor Author

monteiz commented Oct 10, 2024

Thank you 👋

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