Skip to content

fix: BitmapFontManager getFont emitting TextStyle update event#11835

Merged
Zyie merged 3 commits intopixijs:devfrom
subhu339:feature/scissor-masks
Jan 30, 2026
Merged

fix: BitmapFontManager getFont emitting TextStyle update event#11835
Zyie merged 3 commits intopixijs:devfrom
subhu339:feature/scissor-masks

Conversation

@subhu339
Copy link
Contributor

Description of change

Fixes an issue where BitmapFontManager.getFont() could emit a TextStyle update event as a side effect.
Instead of assigning lineHeight via the setter on a prototype-based style clone, the value is now defined directly on the cloned style instance to avoid triggering unintended updates.

Pre-Merge Checklist

Tests and/or benchmarks are included (behavior verified via manual reproduction)
Documentation is changed or added (not required for this internal fix)
Lint process passed (npm run lint)
Tests passed (npm run test)

Fixes #11723

@Zyie Zyie changed the title #11723 Fix BitmapFontManager getFont emitting TextStyle update event fix: BitmapFontManager getFont emitting TextStyle update event Jan 16, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 16, 2026

commit: df43dd6

Copy link
Member

@Zyie Zyie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @subhu339 can we get some tests added for this to verify we no longer emit extra events

@subhu339 subhu339 force-pushed the feature/scissor-masks branch from 99a71d7 to c2e1475 Compare January 17, 2026 09:34
@subhu339
Copy link
Contributor Author

Added unit tests to verify that BitmapFontManager.getFont no longer emits a TextStyle update event.
Also updated the implementation to set _lineHeight directly on the cloned style instance, avoiding the setter and preventing unintended updates.

@Zyie Zyie added the ✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t label Jan 27, 2026
@Zyie Zyie added this to the v8.16.0 milestone Jan 27, 2026
@Zyie Zyie added this pull request to the merge queue Jan 30, 2026
Merged via the queue into pixijs:dev with commit 1ef61cf Jan 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ Ready To Merge Helpful when issues are in the queue waiting to get merged. This means the PR is completed and has t

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BitmapFontManagerClass.getFont emit TextStyle update event

2 participants