Bitmap font is shaking/jittering on newer pixi versions
See original GitHub issueExpected Behavior
I expect for bitmap text to be rendered without shaking, as in previous pixi versions (e.g. 5.3.12). The bitmap font is guaranteed to be monospaced since every glyph has the same xadvance
.
Current Behavior
The text appears to be slightly shaking when changing the value. In the demo I provided, I used the version 6.4.2
as a reference, but I believe that the issues started appearing from the version 6.3.0
.
This is possibly related to #8246.
Steps to Reproduce
The demo code can be found here: https://drive.google.com/file/d/1IVs3gt8ImxiDDhxTLMRyzzx56nr0SXIa/view?usp=sharing
You can toggle pixijs version in the index.html
.
Environment
pixi.js
version: 6.3.0 – 6.4.2
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
PIXI.BitmapFont - PixiJS API Documentation
BitmapFont represents a typeface available for use with the BitmapText class. Use the install method for adding a font to be used. new...
Read more >PIXI V3 Bitmapfont problem! - Pixi.js - HTML5 Game Devs Forum
I'm in the process of turning my current project into V3, when I get this error regarding my bitmap text: "Uncaught TypeError: Cannot...
Read more >Bitmap font is shaking/jittering on newer pixi versions
Bitmap font is shaking/jittering on newer pixi versions · Expected Behavior. I expect for bitmap text to be rendered without shaking, as in...
Read more >Making and Using a Bitmap Font in PIXI.js v5 | AMW Blog
png file to our PIXI.Loader as this will be automatically brought in when loading the .fnt file. const loader = new PIXI ......
Read more >pixi-tagged-text - npm
TaggedText for pixi.js. Latest version: 3.10.0, last published: 19 days ago. Start using pixi-tagged-text in your project by running `npm i ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you for the example @tsopeh and for the visual reference.
This seems to be happening because of an incorrect calculation when setting anchor to anything other than 0 (although setting to 0 seemed fine). It could be a rounding issue or incorrect math or poor implementation of
xOffset
.As a temporary workaround, if you set
xOffset
for each character to be the same thing, that helps.Here’s some video samples that illustrate the issue in a real application:
https://user-images.githubusercontent.com/37545996/178275581-7b8d2c0e-0976-41d2-bb16-0ea89d2c816d.mp4
https://user-images.githubusercontent.com/37545996/178275651-32038511-f1e1-472e-8903-d87ede9a22bf.mp4