fontlabapp.fontui.outline_routes.reflect_vertically
reflect_vertically
Reflect selected nodes and components vertically about their combined centre.
How: A glyph-space reflection maps selected own nodes and composes selected component placements. Shape transforms are accounted for. Selected node bounds include handles; component bounds use the transformed local bounding rectangle. Unselected geometry stays; the table identifies the per-layer centre before Apply.
Why: FontLab's Tools > Flip Vertical command covers this reflection. This panel adds a preview and processes several masters or selected layers in one action. Each action is recorded as one Undo step. Contours > Transform instead transforms whole layers.
Use: Select nodes or components. Open the panel, inspect the table and press Reflect. Choose all masters to process stored selections on multiple master layers together. Reload selection after choosing other glyphs.
Benefit: Repeat a selection edit across glyphs with one planned batch action.
Safety: Locked layers, locked shapes and shared selected outline data are refused. Contours with their own transform are refused. Automatic-layer glyphs and their bases are skipped. The action replans live node selection before writing. A failed write names Edit > Undo. The change is recorded as one Undo step. Anchors, guides, widths and node order stay. FontLab can round node coordinates to its grid.
Source: Independent behaviour-only rewrite after Alex Slobzheninov (slobzheninov), https://github.com/slobzheninov/Glyphs-Scripts, Apache-2.0. No source code, identifiers or comments were copied. Behaviour source: Reflect/Reflect Vertically.py.
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 |
|---|---|---|---|
ACTION |
attribute | (shared captured text) | |
DONE |
attribute | (shared captured text) | |
KEY |
attribute | ||
LINEAR |
function | (value: float) -> affine.Affine |
Reflection linear part in glyph coordinates. |
Move |
attribute | (shared captured text) | |
TITLE |
attribute | ||
XY |
attribute | (shared captured text) | |
main |
function | () -> Any |
Open one reusable panel for this menu. (shared captured text) |
selected_contours |
function | (layer: Any) -> list[tuple[Any, Any, list[Any]]] |
Read selected own contours; refuse locked or shared selected outlines. (shared captured text) |
selection_changes |
function | (layer: Any, value: float) -> list[outline_writer.Change] |
Plan selected nodes and component transforms in glyph coordinates. (shared captured text) |
selection_matrix |
function | (value: float, centre: XY) -> affine.Affine |
Map glyph coordinates about the selected geometry centre. (shared captured text) |