https://github.com/mark2mark/mark-zones-plugin
This is a plugin for GlyphsApp
https://github.com/mark2mark/mark-zones-plugin
Last synced: 3 months ago
JSON representation
This is a plugin for GlyphsApp
- Host: GitHub
- URL: https://github.com/mark2mark/mark-zones-plugin
- Owner: Mark2Mark
- Created: 2021-09-21T16:00:49.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T09:09:54.000Z (over 2 years ago)
- Last Synced: 2025-02-12T12:35:07.792Z (over 1 year ago)
- Size: 1.58 MB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mark Zones
[](https://github.com/Mark2Mark)
A reporter plugin for **Glyphs 3** that displays custom reference zones per master in the Edit View. Define zones by position, thickness, color, overshoot, and name — filtered per script, category, or any combination of glyph properties.
Minimum Glyphs version: build `3062`.
> Do not download directly from here. Please install via GlyphsApp's Plugin Manager.
In use with Latin script
In use with Thai script
## Features
### Zone Types
- **Thick zones** (pair) — a filled band between a position and a thickness. Bordered by solid lines with a curly brace and label on the left.
- **Line zones** — a dashed horizontal line at a single y-position (thickness = 0).
Both types support overshoots:
- **Thick zone** overshoots extend outward in both directions (above and below the zone).
- **Line zone** overshoots extend upward for positions above 0, downward otherwise.
### Glyph Filtering
Zones are only displayed for glyphs that match the filter. The filter uses a Predicate Editor (like you know from other locations in Glyphs, like Global Guidelines) that lets you combine conditions on:
- **Script** (e.g. Latin, Hangul, Thai)
- **Category** (e.g. Letter, Number, Mark)
- **Subcategory** (e.g. Uppercase, Lowercase, Smallcaps)
- **Name** (contains, begins with, ends with)
- **Case** (uppercase, lowercase, smallCaps, etc.)
- **Tags** (contains)
Combine multiple conditions with **All** (AND) or **Any** (OR) logic.
Note: Legacy zone definitions using the old `Script + Script` syntax are automatically converted to predicate filters when opened in the UI.
### Node and Anchor Highlighting
- **Nodes** in an overshoot region are highlighted with a filled circle. Nodes exactly on the zone border are shown as a filled diamond.
- **Selected nodes** get a larger highlight.
- **Anchors** in an overshoot region are highlighted similarly.
- If a zone is named **"Anchors"**, any anchor that is *not* on one of those zone positions is highlighted in orange as a warning.
--IMAGE HERE
### Zone Dragging
Hold **Cmd** and hover over a zone border to see a grab cursor. Then **Cmd-drag** to reposition the zone edge directly in the Edit View:
- Dragging the **bottom** edge of a thick zone moves the entire zone (position changes, thickness stays).
- Dragging the **top** edge of a thick zone resizes it (position stays, thickness changes).
- Dragging a **line zone** moves it to a new y-position.
While dragging, a dashed preview shows the new position along with live position/thickness labels.
### Zone Editing
**Cmd-double-click** a zone edge in the Edit View to open the Custom Parameter UI as a sheet — pre-filled with the clicked zone's properties. Edit name, color, filter, overshoot, zone positions, or linked glyphs without navigating to Font Info. Cancel discards all changes; OK applies them immediately.
### Linked Glyphs
Each zone can have **linked glyphs** — other glyphs whose outlines are transformed when you drag the zone. Each linked glyph has a **stretch** setting:
- **Stretch** (1): scales the linked glyph proportionally to the zone resize.
- **Raise** (0): moves the linked glyph without stretching, keeping its relative position within the zone.
This is useful for adjusting diacritics or other dependent shapes when changing vertical metrics. This also respects the italic angle and stretches or raises the glyphs along the italic angle.
### Undo & Redo
All zone edits made in the Edit View support **Cmd+Z** (undo) and **Cmd+Shift+Z** (redo):
- **Zone dragging** — undo/redo restores the previous zone position or thickness.
- **Zone editing via sheet** — undo/redo reverts or reapplies all changes made in the CP UI.
- **New zone from selection** — undo removes the newly created custom parameter (including duplicates on other masters); redo re-adds it.
### Italic Angle Support
All zone rendering respects the master's italic angle. Zones, overshoots, labels, braces, and drag previews are all sheared correctly.
### Mark Zone Center Line
For glyphs in the **Mark** category, a dotted center line is drawn inside thick zones to help with vertical alignment of combining marks.
### Context Menu: "New Mark Zone from Selection"
Right-click in the Edit View to create a new `MarkZones` custom parameter from the current selection's vertical bounds. Instead of silently adding a zone with defaults, the **Custom Parameter UI opens as a sheet** — letting you edit the name, color, overshoot, filter, and zone positions before committing.
- **Cancel** discards the zone entirely — nothing is saved.
- **Apply to all masters** — when the font has multiple masters and the current glyph is compatible across all of them, a checkbox lets you duplicate the zone to every master. Each master gets its own overshoot (from its baseline metric) and zone positions (mapped from the corresponding nodes in that master's layer).
### Per-Master, Per-Parameter Control
- Zones are defined as `MarkZones` custom parameters on font masters in **Font Info > Masters**.
- You can have **multiple zones** within a single parameter (grouped under the same name and color).
- You can have **multiple MarkZones parameters** per master for different groups.
- **Toggle visibility** of any zone group via the custom parameter checkbox — disable it to hide the zones without deleting the definition.
- Zones are hidden when the **Space key** is held or the **Text tool** is active.
## Custom Parameter UI
Click a `MarkZones` custom parameter to open its editor:
Custom Parameter editor with simple filter and 2 zones
Custom Parameter editor with more complex filter, zones, and linked glyphs
The dialog has these sections:
| Section | Description |
|---|---|
| **Filter** | Predicate editor for script/category/name conditions |
| **Name** | Display name shown next to the zone in the Edit View |
| **Overshoot** | Overshoot distance in units |
| **Color** | Zone color (with alpha support) |
| **Zones** | Table of zone positions and thicknesses |
| **Linked Glyphs** | Table of glyph names and stretch/raise behavior |
## Tips
- It is best to hide GlyphsApp's built-in metrics (`Cmd + Shift + M`), because this plugin draws its own metric lines.
- Name a zone **"Anchors"** to get warnings for anchors that aren't on a defined zone position.
- Group related zones (e.g. all x-height zones) into one parameter to share a name and color.
- Use separate parameters for unrelated zone groups (e.g. uppercase vs lowercase).
- You can also add a Mark Zones CP from Scratch by clicking the + Button in the Custom Parameters List in Font Info, typing `MarkZones` and hitting enter.
## Custom Parameter Format
The raw value stored in the `MarkZones` parameter follows this format:
**Predicate format** (current):
```
?predicateString_Name: r,g,b,a; overshoot; (pos, thick); (pos); ...
```
**Legacy format** (still supported):
```
Script + Script_Name: r,g,b,a; overshoot; (pos, thick); (pos); ...
```
Zones with linked glyphs append `&{glyphName*stretch, ...}` after the position/thickness tuple.