Jump to content

Text fillStroke distorted


sobo
 Share

Recommended Posts

Hi,

 

I have a problem with fillstroke() on a canvas text. I want white text with a black outline of 5px. But on some characters it looks distorted (attached is a screenshot in Chrome, it's Arial 20pt).

I had that problem before with createjs (I used two texts, one white, one with outline=5, above each other). Then I thought it's probably a createjs bug and if I do it using filltext() and fillstroke() right on the canvas it would be solved. But it's the same.

Did anybody have that problem already? It's a little weird because I don't find anything about that and it's a very basic thing...

 

Here the code:

ctx.fillStyle = '#fff';ctx.strokeStyle = '#000';ctx.lineWidth = 5;ctx.font = '20pt Arial';ctx.textAlign = 'center';ctx.strokeText('Hello', 0, 0);ctx.fillText('Hello, 0, 0);

Thanks for help!

 

post-5612-0-24344100-1385472670.jpg

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...