Open zeimusu opened 1 year ago
I don't understand the use case. One would usually use simplify either to clean up an autotrace (which gives no HV points) before manual adjustment or to process a font once manual editing is done for publishing (in which case the conversion has no impact since there is no more tampering).
In any case, even though the FontForge simplify operation, at a low level, mostly culls points and leaves others, it is not designed to provide a one-to-one mapping between points. Its purpose is to try to represent the same shape with fewer points and curves. It cannot guarantee that there is going to be a point at any horizontal or vertical extreme of any curve. If you want those extrema, run "Add Extrema" afterwards.
"Add Extrema" does not currently make HV points either. We could probably add an option to do that if you want.
@frank-trampe, I was recently hit by this issue, too, believing that HV points are preserved; see https://gitlab.com/lilypond/lilypond/-/merge_requests/2374 for more info in case you are interested.
To resolve this issue for the scripting functions it would be sufficient IMHO to simply extend the documentation with what you write in your reply above.
Version 20230101
When simplifying a curve, HV points are converted to simple curve points.
I expect points that are extrema and marked as HV points to be left as HV points after running the simplify routine.
This improvement would make it easier to include "simplify" in a workflow: It is good habit to create all vertical and horizontal curve points as HV points. It would be good if fontforge made it easy to keep extrema as HV points after a simplifying.
A possible alternative would be if "Add extrema" were to make any extrema on curves HV points.
before Simplify:
*
After simplify:
Important
Mark with [x] to select. Leave as [ ] to unselect.
When reporting a bug/issue:
When you open an issue for a change/improvement/feature request: