Comments (13)
Should be easy enough for someone to add 2 color pickers, one for stroke and one for fill.
Then an input for stroke width and bevel selector.
from google-font-to-svg-path.
Sorry i think i did not give more details to my question.
I will provide more details, so that you can provide help / guidance for this.
Currently for any font i am getting the stroke path
but what i need is the inner / fill path of the letter
Please suggest how to get the fill path?
from google-font-to-svg-path.
If you look at the generated svg, there is currently a fill="none"
attribute. After you have copied and pasted it, you can change fill to your color. You can also change or remove the stroke color and stroke width attributes.
from google-font-to-svg-path.
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.
from google-font-to-svg-path.
In SVG, the stroke and fill path are the same thing. It's just a matter of coloring the path itself (for stroke), or the space between the path enclosure (for fill). I think you might be looking for the "centerline" of the fill area? If so, know that this is a somewhat complex computation, not provided in this library. See https://observablehq.com/@veltman/centerline-labeling for an example of creating a Voronoi diagram to achieve the centerline.
Also, you may get into situations where the line is circular as in O
or multi-jointed as in X
. Even with a centerline, I'm uncertain how to animate filling.
Perhaps you might break the outline path into separate polygons and and animate the fill using attributes?
https://stackoverflow.com/questions/55609857/how-to-animate-a-svg-polygon-to-fill
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/animate
If so, there's still a computation to break into separate polygons.
from google-font-to-svg-path.
Here's an example which might be the type you're looking for?
https://codepen.io/munkholm/pen/EaZJQE
I'm not sure the technique they used.
from google-font-to-svg-path.
Thanks @danmarshall i will check with your inputs and update whether i can solve it.
from google-font-to-svg-path.
@danmarshall, I tried to find the way to get the filled path using paper js / maker js libraries but could not find a solution for this.Please let me know if you can provide or help by providing more direction for this?
from google-font-to-svg-path.
Check out this article: https://css-tricks.com/how-to-get-handwriting-animation-with-irregular-svg-strokes/
from google-font-to-svg-path.
Thx @danmarshall, in this approach they create the paths / mask manually, i want someway to do these steps dynamically.
There are some single line / single stroke fonts which i am trying to use for this
https://www.quantumenterprises.co.uk/handwriting-fonts/single-line-handwriting-fonts-explanation.htm
from google-font-to-svg-path.
@kpomservices - yes the article uses a manual method. Automating it is the harder issue. Again, I suggest looking at Noah's technique to find the "spine" of a shape https://observablehq.com/@veltman/centerline-labeling
from google-font-to-svg-path.
Ok Thx.
I tried with single stoke font, but its also showing multiple strokes after getting converted
I will check centerline-labeling technique.
from google-font-to-svg-path.
Closing this for now, since this library does not provide this functionality. Thanks for bringing it to discussion.
from google-font-to-svg-path.
Related Issues (20)
- This is AWESOME! HOT 4
- Bezier library not found. If you are using Node, try running 'npm install' or if you are in the browser, download http://pomax.github.io/bezierjs/bezier.js to your website and add a script tag. HOT 1
- Build this as an API? HOT 4
- Add support to set custom fill options HOT 1
- Multiple text Line Support HOT 6
- Special symbols like this ★ HOT 3
- Fonts are being clipped
- Command line usage? HOT 2
- "fill-rule: evenodd" causing holes in glyphs HOT 1
- Incorrect result when using Gujarati charactor with `િ` diacritic.
- Thank you ! HOT 2
- Feature Request: Ability to change the letter spacing
- any chance to have Persian or Arabic Fonts? HOT 5
- Unbounded Font Bugs HOT 6
- How to download and run? HOT 2
- Request for dark mode
- Request for dark mode
- Disable Elliptical Arcs ? HOT 17
- Custom Fonts HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-font-to-svg-path.