Skip to content

fontlabapp.fontui.outline_routes.delete_close_points

delete_close_points

Merge endpoints of segments shorter than a chosen distance.

What: Merge endpoints of segments shorter than a chosen distance. How: Measure cubic arc lengths with 32 samples; remove short incoming spans. Closed contours retain at least three endpoints. Why: Remove tiny segments left by tracing. Use: Set the distance in font units, inspect the counts, then press Apply. Benefit: Shows exactly which segments change before a batch edit.

The non-modal panel previews the selected glyphs and chosen masters. Shared, scaled and rotated outline shapes are kept. Automatic-layer owners are kept. Bases of automatic composites are kept unless the shared consent option is enabled. Each Apply is recorded as one Undo step through the App history writer. Reload after changing the selection.

Independent behaviour rewrite after Simon Cozens, GlyphsScripts/Delete Close Points.py, MIT, copyright 2017 Simon Cozens. Repository: https://github.com/simoncozens/GlyphsScripts . No source code was copied.

Classes

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
KEY attribute
TITLE attribute
arc_length function (span: list[Any]) -> float Sample a cubic at 32 equal parameter intervals; exact length for a line.
changes function (layer: Any, limit: float) -> list[writer.Change] Plan removals from original spans; keep three endpoints per contour.
main function () -> Any Open one non-modal panel; replace an earlier panel of the same tool. (shared captured text)