Jump to content
Search Community

Draw SVG for uneven stroke width ?

Juc1 test
Moderator Tag

Recommended Posts

Hi all,

 

In my codepen I am using drawsvg to draw the stroke which has stroke-width:18px - but how would I do this for an uneven stroke something like the Canva logo below?

 

I am not asking can drawsvg draw uneven widths? - I think the answer is no - so I am asking is there some workaround or different approach for this.

If i draw the letters with strokes then I can use drawsvg but I am stuck with a fixed stroke-width. 

If I draw the letters with fills / shapes instead of strokes then I can have the variation in width but I can't use drawsvg. 

 

I guess I could use drawsvg and apply masks to thin sections of the stroke but is there a better way with or without drawsvg?

canva.jpg.7ae2fb8399db0f58681cc2d9b0eb387e.jpg

 

 

See the Pen ExXpBax by Juc1 (@Juc1) on CodePen

Link to comment
Share on other sites

Yep - masking is the best choice IMHO. I have a whole tutorial about variable width strokes and calligraphy handwriting. I also cover how to handle it when sections of the letters overlap themselves. 

 

https://www.motiontricks.com/svg-calligraphy-handwriting-animation/

 

See the Pen zYqYOrp by PointC (@PointC) on CodePen

 

Happy tweening.

:)

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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