Hello Alexei,


*> Great! Without further delay, go ahead and write a standalone program >
that calculates DF for a outline glyph in whatever format you choose > or
is appropriate.*

I have written the program, you can find it at:
https://github.com/preversewharf45/freetype2-sdf
To view the output I'm currently using a small OpenGL framework:
https://github.com/preversewharf45/freetype2-sdf-demo
this already has the sdf code.

However there is an issue with the program, the glyphs which contain
intersecting contours have an issue.
(example: https://imgur.com/MxJfAwY)
Currently the sign of the distance is determined by the orientation of the
closest edge, so at places where
one contour intersects another the pixel near that contour can be specified
as outside even though it is
inside the shape.
To fix this issue I'm thinking of using the winding of the contours, so is
there any function in freetype
to get the winding or something similar?

Also, should I start integrating this in freetype or first fix the issue?


Anuj

Reply via email to