Jump to content

text wide stroke rendering issue


LinkTree
 Share

Recommended Posts

Hi, I just ran into this issue when rendering text with a stroke. I took this image from another thread here. it shows the issue pretty well. do you see these sharp black extrusions from the text stroke? I am not sure what's causing this. it happens when you try to give text a wide stroke and depends on the size of the font. larger fonts require wider stroke to make this issue noticeable.

 

fgEhXVj.jpg

Link to comment
Share on other sites

Set the lineJoin property to round.

 

Thanks. this functionality is currently missing in panda.js's pixi lib so I had to add it myself.

 

add this

style.lineJoin = style.lineJoin || 'miter';style.miterLimit = style.miterLimit || 10;

to PIXI.Text.prototype.setStyle

 

and this

this.context.lineJoin = this.style.lineJoin;this.context.miterLimit = this.style.miterLimit;

to PIXI.Text.prototype.updateText after

this.context.textBaseline = 'alphabetic';
Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...