Skip to content

Conversation

privatestefans
Copy link
Contributor

@privatestefans privatestefans commented Jul 8, 2025

Description of change
  • Ensure sub-textures created for rotated spritesheets use the correct frame and rotation properties
  • Prevent stretching the drawing result by modifying the BitmapTextPipe to use the character’s original width and height instead of the frame’s dimension
Pre-Merge Checklist
  • Tests and/or benchmarks are included
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)
Linked

- Ensure sub-textures created from rotated spritesheets use the correct frame and rotation properties
- Prevent stretching the drawing result by modifying the BitmapTextPipe to use the character’s original width and height instead of the frame’s dimension
Copy link

codesandbox-ci bot commented Jul 8, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit de85252:

Sandbox Source
pixi.js-sandbox Configuration

Comment on lines +17 to +29
A: {
id: 65,
page: 0,
x: 248,
y: 74,
width: 29,
height: 35,
xOffset: 1,
yOffset: 6,
xAdvance: 31,
letter: 'A',
kerning: {},
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case if anyone is wondering where this value comes from, I obtained it from the original .fnt file. The value is similar, so we don't need to rotate or modify anything and can simply use the original value even if the font appears rotated in the spritesheet.

<char id="65" index="36" char="A" width="29" height="35" xoffset="1" yoffset="6" xadvance="31" chnl="15" x="248" y="74" page="0"/>

Copy link

pkg-pr-new bot commented Jul 22, 2025

pixi.js-basepixi.js-bunny-mark

npm i https://pkg.pr.new/pixijs/pixijs/pixi.js@11525

commit: aa7560c

@privatestefans
Copy link
Contributor Author

Before this PR: https://pixiplayground.com/#/edit/QvD5KtMV2dpUE3A9MNVHk
After this PR: https://stackblitz.com/edit/xsykwarg?file=src%2Findex.js

It seems the unit test need a re-run due to request timeout.

Thanks @Zyie for integrating StackBlitz, we can now provide a preview for the fix.

@GoodBoyDigital
Copy link
Member

pushed a couple of tweaks! leveaging your fix - but moving the logic to the groupD8 class!

@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 Jul 23, 2025
@Zyie Zyie added this pull request to the merge queue Jul 23, 2025
Merged via the queue into pixijs:dev with commit 05de515 Jul 23, 2025
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.

Bug: Bitmap font not taking account texture rotation
3 participants