You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Text is totally corrupts when a Bitmap Font not include all characters needed for text render.
Expected Behavior
Valid text rendering, but with spaces (or any other "unknown" character) as placeholder for missed glyphs.
Like this:
bitmap fonts supported
1234567890
Woo yay im ubmormal
bugged this is cool
Steps to Reproduce
Make something like this:
/*** This is the default playground.* You should see a bunny spinning in the right preview pane.* Feel free to use this as a starting point for you own playground!*/// Create our application instancevarapp=newPIXI.Application({width: window.innerWidth,height: window.innerHeight,backgroundColor: 0x2c3e50});document.body.appendChild(app.view);{PIXI.BitmapFont.from("Arial",{// no config, use default to emulate missed glyph});constbitmapFontText=newPIXI.BitmapText(',,,,,,,,,,,bitmap fonts supported --------- 1234567890\nWoo yay im ubmormal bugged,!!!! this is cool!',{fontName: 'Arial',fontSize: 20,maxWidth: 200,},);bitmapFontText.x=50;bitmapFontText.y=200;app.stage.addChild(bitmapFontText);}
Because after that you use relative index and sure that "i" correspond to char array, but because some chars was drops - indices is shifter every line.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Current Behavior
Text is totally corrupts when a Bitmap Font not include all characters needed for text render.
Expected Behavior
Valid text rendering, but with spaces (or any other "unknown" character) as placeholder for missed glyphs.
Like this:
Steps to Reproduce
Make something like this:
Environment
pixi.js
version: *e.g. 5.1.0 +Possible Solution
No skip character, use DUMMY:
pixijs/packages/text-bitmap/src/BitmapText.ts
Line 282 in 5ae1d3b
pixijs/packages/text-bitmap/src/BitmapText.ts
Line 316 in 5ae1d3b
Because after that you use relative index and sure that "i" correspond to char array, but because some chars was drops - indices is shifter every line.
Additional Information
No response
The text was updated successfully, but these errors were encountered: