Skip to content

Phaser.Text gets cut off at bottom if value for lineSpacing is negative #1690

@anthonysapp

Description

@anthonysapp

If you supply an instance of Phaser.Text with a negative value for lineSpacing, its resulting height causes its text to be cut off at the bottom.

Phaser.Text line 398
var height = (lineHeight + this._lineSpacing) * lines.length;

My current fix:
var height = (lineHeight + (Math.max(this._lineSpacing, 0))) * lines.length;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions