Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill Path instead of stroke path #488

Closed
kpomservices opened this issue Aug 25, 2021 · 6 comments
Closed

Fill Path instead of stroke path #488

kpomservices opened this issue Aug 25, 2021 · 6 comments

Comments

@kpomservices
Copy link

Thanks for the library to get the bézier path for the text.
Currently we get the stroke bézier path for the text, is there is any way to get the fill path bézier data of the text?

Currently for any font getting the stroke path
image

but what i need is the inner / fill path of the letter
image

Please suggest how to get the inner/fill bezier path of the text?

@axkibe
Copy link
Contributor

axkibe commented Aug 31, 2021

I don't get the issue, if you want the letter to be filled, use fill() call of canvas..

@kpomservices
Copy link
Author

Yes i can change the fill color, but I need the bezier path information of that fill area,

I am trying to animate the bezier path of the letter / text, currently its animating the path of the stroke path.
But i need to animate the fill section so that it look like hand-writing animation.

@danmarshall
Copy link

Related: #434

@axkibe
Copy link
Contributor

axkibe commented Feb 7, 2022

I see, this is not something that can easily be computed even only approximated and IMO beyond the scope of this library.

I don't think an opentype/truetype font is something you should use in a usecase like this, because they are constructed differently as you found out. You need a font system that is "stroked" by design or just do the paths manually and avoid font systems all together.

@Connum
Copy link
Contributor

Connum commented Feb 5, 2023

I would agree that this is outside of the scope of what opentype is intended for. A comment in #434 links to a possible solution for this.
I'd suggest closing this and #434 @ILOVEPIE

@ILOVEPIE
Copy link
Contributor

ILOVEPIE commented Feb 6, 2023

The stroke and fill path should be the same.

@Connum Connum closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants