Glyph

Boolean and Layer Operations

Two overlapping shapes on a mask usually need to become one thing — or the difference between them, or only what they share. Glyph gives you two separate tools for that, and it matters which one you reach for. Selection booleans consume the shapes you pick and leave one result in their place; layer operations read two whole layers and write the result to a third, leaving the sources untouched. This guide walks through both, plus the two things that live in the same dialog and panel as layer operations: grow/shrink sizing, and the dark-field mask-tone preview.

Time: ~13 min

You'll need: Glyph open on a blank document. Nothing to download, no file to load.

One orientation note before you start: the tabbed panel with Layers / Cells / Objects / Results sits on the right-hand side of the window, underneath Properties — this guide uses it constantly. A blank document starts with three layers already defined (Layer 1, Layer 2, Layer 3); this guide uses Layer 3 for the selection-boolean demo and Layers 1/2 for the layer-operations demo, so the two exercises never share geometry. No drag lands on an exact micrometre by hand, so every box below follows the same pattern: drag roughly with the Box tool, then read and correct its exact X, Y, W, H in the Properties panel (which is authoritative), pressing Enter after each. W and H resize the shape about its centre — the Anchor choice only changes what X and Y mean. With Anchor on Corner, type W and H before X and Y (resizing about the centre moves the corner, so a later size edit would shift the position you just typed); with Anchor on Center, the order doesn't matter.

  1. Draw two overlapping boxes. Click the Layer 3 row in the Layers panel to make it the active drawing layer, then pick the Box tool and drag out a rough box near the origin. Glyph's draw tools are one-shot and drop back to Select after each shape, so the box stays selected — type W 20, H 20, then X -15, Y -15 (µm) into Properties to land it exactly at −15 to 5 µm on both axes. Pick Box again — re-arming is required every time — and drag a second rough box a little up and to the right, then size it to W 20, H 20, X -5, Y -5, overlapping the first by 10×10 µm. The status bar reads 2 shapes · 1 selected.

    Glyph canvas with two overlapping 20 by 20 micrometre cyan hatched boxes drawn on Layer 3 at exact Properties-panel coordinates, an orange selection outline around the just-sized box, the Properties panel reading X -5.00, Y -5.00, W 20.00, H 20.00 micrometres, and the status bar reading 2 shapes and 1 selected.
  2. Select both boxes. Click the Select tool and drag a marquee that encloses both boxes, starting from empty canvas. Once you release the drag, the marquee rectangle itself disappears and both boxes show pale selection outlines instead — there are no handles on the pair. The reliable confirmations are the Properties panel reporting their combined 30×30 µm bounding box and the status bar reading 2 selected.

    Glyph canvas after releasing a marquee drag, showing no marquee rectangle but both overlapping boxes on Layer 3 outlined pale as selected, the Properties panel showing a 30 by 30 micrometre combined bounding box, and the status bar reading 2 shapes and 2 selected.
  3. Read the boolean shortcut off the hint strip. At the bottom of the window, a hint line always shows what the current tool can do next. With the Select tool active it ends U/D/I/X boolean on 2+ shapes — four single-key shortcuts for Union (OR), Difference (SUB), Intersect (AND) and XOR — the names every menu and dialog now uses — live the moment two or more shapes are selected.

    A crop of Glyph's status-hint strip at the bottom of the window, reading drag to select, double-click a reference to enter it, U slash D slash I slash X boolean on 2 plus shapes.
  4. Press U. The two overlapping boxes merge into a single L-shaped boundary — a real union, not two shapes drawn on top of each other. The status bar reads 1 shape. Selection booleans consume their inputs: the two source boxes are gone, replaced by the one result. I and X don't care which shape you selected first or second — keep-the-overlap and keep-the-non-overlap are symmetric either way. D is the one that does care about order, but not the order you clicked in: it subtracts every other selected shape from whichever was drawn first (earliest in the cell), which is not necessarily whichever you happened to click first or last in a marquee.

    Glyph canvas showing a single L-shaped cyan hatched boundary shape with an orange selection outline where the two overlapping boxes used to be, on Layer 3, with the status bar reading 1 shape and 1 selected.
  5. Press Ctrl+Z. The union is a normal command on the undo stack, so undo restores exactly the two original boxes — same positions, same layer, same shapes — and their selection along with them. The status bar reads 2 shapes · 2 selected again.

    Glyph canvas after undo, showing the two original overlapping boxes on Layer 3 restored and still selected, the Properties panel showing their 30 by 30 micrometre combined bounding box, and the status bar reading 2 shapes and 2 selected.
  6. Set up a whole-layer operation. Click the Layer 1 row to make it active, pick Box and drag a rough box, then size it to X 50, Y -10, W 20, H 20 (µm) — and press Ctrl+0 (View → Zoom to fit) after sizing it, since those coordinates sit outside the view you drew steps 1–5 in. Click Layer 2's row, pick Box again — the tool re-arms every time, same as step 1 — drag a second rough box, and size it to X 62, Y -6, W 20, H 20, overlapping the first by 8×16 µm. Open Arrange → Layer operations…. This dialog works on entire layers, not a selection: leave Operation on Union (A OR B), Layer A on 1/0 — Layer 1 and Layer B on 2/0 — Layer 2. New layer number defaults to the lowest unused layer number the instant the dialog opens — right now that's 0, since 1, 2 and 3 are taken — and it recomputes that default every time you reopen the dialog, so it never remembers a value you typed earlier. Type 4 to override it, so the result lands on a fresh layer numbered 4/0 instead of 0/0.

    Glyph's Layer operations dialog with Operation set to Union A OR B, Layer A 1/0 Layer 1, Layer B 2/0 Layer 2, Output layer New layer, New layer number 4, New datatype 0, and Cancel and Run buttons, with the sized Layer 1 and Layer 2 boxes visible behind it on canvas.
  7. Click Run. A toast confirms 1 shape added to 4/0 (new layer)., and a new row named L4/0 appears in the Layers panel holding 1 shape (Glyph names an auto-created layer after its number when you don't type one yourself). Layer operations are non-destructive: Layer 1 and Layer 2 still read 1 each — their boxes were only read, never removed. This is the exact opposite of step 4's selection union, and it's why the two tools coexist rather than one replacing the other.

    Glyph canvas with a toast reading 1 shape added to 4 slash 0 new layer in the bottom right corner, and the Layers panel on the right showing Layer 1 count 1, Layer 2 count 1, Layer 3 count 2, and a new row named L4/0 with count 1.
  8. Reopen the dialog and switch to Grow. Open Arrange → Layer operations… again and change Operation to Grow A by distance. Grow and shrink are unary — Layer B disappears from the form entirely and a Distance field takes its place, because sizing only ever reads one layer. New layer number has already recomputed itself back to 0 — same recompute-on-open behaviour as step 6, and the same answer, because layer 0 still hasn't been created; only 1, 2, 3 and now 4 have. Leave it there and type 2 into Distance (µm) for a 2 µm grow. Sizing is true morphological offsetting with round corners, the same construction the design-rule checker uses; it's capped by input vertices rather than shape count because it costs roughly eight times a plain boolean on the same shapes.

    Glyph's Layer operations dialog with Operation switched to Grow A by distance, Layer A 1/0 Layer 1, a Distance field showing 2 in place of Layer B, Output layer New layer, New layer number 0, and Cancel and Run buttons.
  9. Click Run. A toast confirms 1 shape added to 0/0 (new layer)., and a new row named L0/0 appears in the Layers panel — a rounded copy of Layer 1's box, 2 µm bigger on every side, the rounded corners a Minkowski offset always produces. Layer 1 itself still reads 1: grow is exactly as non-destructive as the union above.

    Glyph canvas showing the grown, rounded-corner copy of Layer 1's box drawn slightly larger than and behind the original, a toast reading 1 shape added to 0 slash 0 new layer, and the Layers panel showing Layer 1, Layer 2, Layer 3, L4/0 and a new row L0/0 each with their shape counts.
  10. Set Layer 1's mask field tone. Click Layer 1's colour swatch — the small ~14 px hatched square at the left edge of its row — to open Layer colours, then click Dark field under Mask field tone.

    Crop of the top of Glyph's Layer colours dialog: Current fill and edge both hex ee7733, and Mask field tone with Dark field now highlighted in orange next to Unset and Clear field.
  11. Close the dialog and find the new row icons. Click Close, then click the Layer 1 row to make it the active layer again — Layer 2 has been active since step 6. The row now shows two things it didn't before: a DF badge (dark field) right after the layer name, and — immediately after that DF badge, before the 1/0 layer number — a small contrast icon, distinct from the opacity slider, the select-shapes-on-layer icon, the visibility eye and the lock further along the row. That contrast icon is the field-preview toggle you'll click next.

    Crop of Layer 1's row in the Layers panel: colour swatch, name Layer 1, a DF badge, a small contrast icon, 1/0, shape count 1, then the opacity slider and the visibility/lock icons partly visible at the right edge.
  12. Preview Layer 1 as it will actually expose. Click the contrast icon. Every other layer hides and the canvas repaints as a punch-out: the mask blank fills in Layer 1's colour (the chrome), with the drawn box cut out of it in the background colour (the opening). A bar across the top of the Layers panel names the layer and its tone (DARK FIELD · INVERTED), and offers Blank width × height fields (they show the auto-fit size — 24 × 24 here — which you can overwrite with your own) plus a margin percentage that pads that auto-fit, so you can preview against a specific mask blank instead of just the layer's own bounding box. This is preview-only — geometry and exports are unchanged, and it's exclusive, so only one layer previews at a time. Click EXIT, top right of that bar, to leave the preview and bring every other layer back.

    Glyph canvas in dark-field preview mode: an orange mask blank with a black square punched out of its centre representing Layer 1's box, the Layers panel showing a bar reading Layer 1, dark field, inverted with an Exit button, Blank width and height fields and a margin percentage, and Layer 1's row showing its DF badge.

What you built

Six shapes across five layers, and every combining tool Glyph has: a selection union you could undo back to its two sources on Layer 3, a non-destructive whole-layer union that left Layer 1 and Layer 2 readable while writing its result to L4/0, a grow operation that read Layer 1 and wrote a rounded, 2 µm-larger copy to L0/0, and a live dark-field preview of what Layer 1 will look like as exposed chrome. None of the last three touched geometry outside their own output layer — that's the whole point of keeping selection algebra and layer algebra as two separate tools.

Next steps

Read Boolean operations and layer merge for the full U/D/I/X reference and the related "Merge active layer" command, and Layers for everything else a layer row carries — colour, fill pattern, opacity, lock, and mask field tone. The rest of the Arrange menu, including Layer operations' grow/shrink cousins, is in Arrange, and every shortcut used above is listed in Keyboard shortcuts. Then open the editor and try a difference or an XOR on your own layers.

Updated 2026-08-26

Open Glyph — free, no install Your files never leave your computer.
Open Glyph →