Copy link to clipboard
Copied
Good evening everyone, in the HTML5 canvas is it possible to add a stroke to a text with a line of code? as done, for example, to add a shadow:
this.shadow = new createjs.Shadow("rgba(0,0,0,0.9)",0,0,9);
thank you all so much for any help!
Hi.
Set a value bigger than 0 to the outline property. For example:
this.yourTF.outline = 2;
If needed, place two text fields over each other to keep the fill and the stroke.
Regards,
JC
Copy link to clipboard
Copied
Copy link to clipboard
Copied
thank you very much but maybe i misunderstood, i already have some text, i need to add an outer border to this text using code instead of converting it to shape and manually adding the stroke to each letter...
it can probably be done with a trick using a multiple shadow as well but I'm not very handy with the code in the html5 canvas
Copy link to clipboard
Copied
Sorry, I wasn't helpful. Hopefully, you get it figured out.
Copy link to clipboard
Copied
Thanks anyway, any help is always helpful! Thanks again
Copy link to clipboard
Copied
Hi.
Set a value bigger than 0 to the outline property. For example:
this.yourTF.outline = 2;
If needed, place two text fields over each other to keep the fill and the stroke.
Regards,
JC
Copy link to clipboard
Copied
This is good information JoãoCésar