Skip to content

Bug: BitmapText's lineHeight is incorrect #11067

@amoffat

Description

@amoffat

Current Behavior

The lineHeight on a BitmapText object needs to be much bigger than necessary. For example, a fontSize of 50 needs a lineHeight of 100 in order to have flush lines.

Expected Behavior

A fontSize of 50 should only need a lineHeight of 50 to have flush lines.

Steps to Reproduce

https://codesandbox.io/p/sandbox/charming-mccarthy-76dyvf

Environment

  • pixi.js version: e.g. 7.1.0
  • Browser & Version: e.g. Chrome 108
  • OS & Version: e.g. Ubuntu 22.04
  • Running Example: e.g. https://pixiplayground.com/

Possible Solution

I believe the lineHeight needs to be scaled by the BitmapText's scale metric, before being interpreted.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: normalImportant but not blocking the next releasescope: text-bitmapIssue related to BitmapText rendering

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions