mwatt Posted September 29, 2013 Share Posted September 29, 2013 I've recently just begun playing around in Pixi and as the title says, have encountered an oddity in the display of text in Chrome. It's hard to describe how it looks but it's definitely messed up in Chrome - though it shows fine in Firefox and IE10. Here is the code snippet that creates and adds a very large number 5 to the stage: var fiveParams = {font: "bold 360px Arial", fill: "#0000FF", stroke: "navy", strokeThickness: 10};var five = new PIXI.Text("5", fiveParams);five.anchor = new PIXI.Point(0.5, 0.5);five.position.x = (five.width / 2) + 84;five.position.y = (five.height / 2) + 144;stage.addChild(five); Am I doing something wrong or is there a bug in Chrome? Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted September 29, 2013 Share Posted September 29, 2013 Thats an interesting one! looks like you found a bizarre chrome bug!Seems like when the font size is too big canvas starts behaving oddly..I'm not too sure there is anything we can do about this as its a problem with canvas itself rather than pixi :/ Quote Link to comment Share on other sites More sharing options...
mwatt Posted September 29, 2013 Author Share Posted September 29, 2013 Thanks for the super-fast reply Mat. If I find out anything more about this I'll add it to this post. Quote Link to comment Share on other sites More sharing options...
mwatt Posted September 29, 2013 Author Share Posted September 29, 2013 I discovered something. When you take away the stroke settings, It doesn't happen at all. If a strokeThickness of 1 is applied instead of 10 is applied, it does not look as it should - there is "air" between the stroked outline and the fill - but things are not nearly so distorted as when it is set at 10. If you increment the strokeThickness by 1 on successive tries, the distortion becomes more and more apparent. Perhaps it is a pixi-addressable issue after all. I dunno, but wanted to give you a heads up on what I found. Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted September 29, 2013 Share Posted September 29, 2013 Cool! no worries about fast reply - I'm on a rare evening of downtime where I can respond to people Yeah definitely funny old issue. From the pixi side all the text object does as draw the font using the fillText and strokeText functions to a texture. Probably best to for one of us to test those two functions outside of pixi.js to be 100% sure though. Quote Link to comment Share on other sites More sharing options...
mwatt Posted September 29, 2013 Author Share Posted September 29, 2013 Pixi.js is exonerated! I tested it outside of pixi - the problem still occurs, so definitely a Chrome bug. Once again, thanks for your support. I am liking pixi.js so far. Quote Link to comment Share on other sites More sharing options...
Mat Groves Posted September 29, 2013 Share Posted September 29, 2013 Woop woop! (sort of) good to hear Glad you are liking pixi too! Quote Link to comment Share on other sites More sharing options...
mwatt Posted September 30, 2013 Author Share Posted September 30, 2013 A final word on this and then I'll shut up. This is a known and logged bug: http://code.google.com/p/chromium/issues/detail?id=280221&can=1&q=strokeText%20font&colspec=ID%20Pri%20M%20Iteration%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.