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

Sample code that just outputs the line points #32

Open
ort111 opened this issue Feb 8, 2024 · 1 comment
Open

Sample code that just outputs the line points #32

ort111 opened this issue Feb 8, 2024 · 1 comment

Comments

@ort111
Copy link

ort111 commented Feb 8, 2024

Very nice stuff. I have looked over the code briefly, but how hard would it be to get a scaled output of a character for just the line points and then can be processed from there. I will take some more time to look at the code, but maybe can come up with a sample app that does this quickly? Going to try and put this on a small micro, etc.

Will deal with the curves later depending on how it looks.

Thanks

@tomolt
Copy link
Owner

tomolt commented Feb 9, 2024

There is currently no API for that, but it should be pretty easy to implement.
libschrift first accumulates all lines and curves of a glyph in a struct outline buffer,
then tesselates the curves into more straight line segments.
So after tesselate_curves() has finished, that struct contains exactly what you need:
an array of endpoints, and array of line segments, where each line is represented as a pair of indices into the point array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants