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

"Spikes" between paths #1

Open
CapacitorSet opened this issue Apr 19, 2018 · 2 comments
Open

"Spikes" between paths #1

CapacitorSet opened this issue Apr 19, 2018 · 2 comments

Comments

@CapacitorSet
Copy link

Heyo! I've been trying to use humanlines to draw human-like text, but for some reason it shows spikes between one path and another. Do you know what may cause this?

Screen

The code is here, and here is a tarball for a working version.

@RyanMarcus
Copy link
Owner

Yikes, yeah, that absolutely looks like a bug. My guess is that the randomness added to each spline, which is a constant amount not dependent on the scale of the line, is causing the spikes.

If I change the font size to 900 and the Y coord to 600:

path = font.getPath("lorem ipsum", 0, 600, 900);

The result looks quite a bit better, but the sharp edges are still there.

I think fixing this will require adding some semantic information to the algorithm, so that the lines are not drawn entirely independently as they currently are (e.g., if two lines share a start/ending point, the results should be smooth). I'll take a look next week...

Sorry for the trouble!

@CapacitorSet
Copy link
Author

Sorry for the trouble!

No problem! That was just a "weekend project" to fiddle with humanlines, no big deal. Interesting project, by the way!

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

2 participants