Sign in to follow this  
mwatt

Problem with PIXI.Text rendering in Chrome

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.