@logomarks/generate 0.4.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Check: a tick as a construction, for tasks, compliance and done (the owner's tech-brand audit, 2026-11-27). A short leg
3
+ * and a long leg, heavy, with ONE move: the legs parted at the heel by the gap, the tick doubled or tripled in parallel
4
+ * bands, or the tick cut out of a slanted slab or a disc segment. Never a checkbox (nothing round it, no hole: a tick in a square), never a tick in a circle (the verified
5
+ * badge), never a thin stroke (the plain icon): every tick is heavy and carries its move. It never turns or mirrors (a
6
+ * tick backwards or on its side is no tick).
7
+ */
8
+ import { U, D, I, poly, rect, rr, circle, grow, mitreBand } from '@logomarks/core/geometry';
9
+ import { BOX, GAP, tidy } from '../draw.js';
10
+
11
+ /** @type {import('../index.js').Control[]} */
12
+ export const controls = [
13
+ { key: 'move', label: 'Move', type: 'choice', options: ['heel', 'double', 'triple', 'slab', 'half'], value: 'heel' },
14
+ { key: 'weight', label: 'Weight', type: 'range', min: 0.15, max: 0.26, step: 0.005, value: 0.2 },
15
+ { key: 'angle', label: 'Long leg angle', type: 'range', min: 40, max: 62, step: 1, value: 50 },
16
+ { key: 'short', label: 'Short leg', type: 'range', min: 0.34, max: 0.56, step: 0.01, value: 0.44 },
17
+ { key: 'ends', label: 'Ends', type: 'choice', options: ['square', 'level', 'round'], value: 'level' },
18
+ { key: 'spacing', label: 'Gap', type: 'range', min: 1, max: 1.7, step: 0.05, value: 1.2 },
19
+ ];
20
+
21
+ /** A tick's centreline: the short leg down to the heel, the long leg up, the heel at (hx, hy); `L` the long leg's length. */
22
+ function tickPts(hx, hy, L, p) {
23
+ const a = (p.angle * Math.PI) / 180, b = ((90 - p.angle + 10) * Math.PI) / 180, s = L * p.short;
24
+ return [[hx - s * Math.cos(b), hy - s * Math.sin(b)], [hx, hy], [hx + L * Math.cos(a), hy - L * Math.sin(a)]];
25
+ }
26
+
27
+ /** A heavy tick of weight `w` on a centreline, its ends cut square to each leg, level, or round. */
28
+ function tick(pts, w, ends) {
29
+ if (ends === 'round') return U(mitreBand(pts, w), circle(...pts[0], w / 2, 64), circle(...pts[2], w / 2, 64));
30
+ if (ends !== 'level') return mitreBand(pts, w);
31
+ // level ends: each leg run on past its end, then cut by a level line through that end
32
+ const ext = (a, b, k) => [a[0] + (a[0] - b[0]) * k, a[1] + (a[1] - b[1]) * k], far = BOX.size * 3;
33
+ const s = mitreBand([ext(pts[0], pts[1], 0.4), pts[1], ext(pts[2], pts[1], 0.3)], w);
34
+ const right = rect(pts[1][0], pts[2][1], far, far), left = rect(pts[1][0] - far, pts[0][1], far, far);
35
+ return I(s, U(right, left));
36
+ }
37
+
38
+ /** The mark for resolved params. */
39
+ export function build(p) {
40
+ const g = GAP * p.spacing, w = BOX.size * p.weight, L = BOX.size * 0.78;
41
+ const hx = BOX.cx - L * 0.16, hy = BOX.cy + L * 0.3, pts = tickPts(hx, hy, L, p);
42
+ if (p.move === 'double' || p.move === 'triple') {
43
+ // the tick and one or two copies above it, each a gap clear of the one below
44
+ const n = p.move === 'double' ? 2 : 3, step = w + g, out = [];
45
+ for (let k = 0; k < n; k++) out.push(tick(pts.map(([x, y]) => [x + k * step * 0.18, y - k * step]), w, p.ends));
46
+ let s = out[0];
47
+ for (let k = 1; k < n; k++) s = U(s, D(out[k], grow(s, g)));
48
+ return tidy(s);
49
+ }
50
+ if (p.move === 'heel') {
51
+ // the two legs as two bars: the long one run back a little past the heel, the short one stopping a gap short of it
52
+ const [a, h, c] = pts, dl = [c[0] - h[0], c[1] - h[1]], ll = Math.hypot(...dl);
53
+ const back = [h[0] - (dl[0] / ll) * w * 0.5, h[1] - (dl[1] / ll) * w * 0.5];
54
+ let longBand = mitreBand([back, c], w), shortBand = mitreBand([a, h], w);
55
+ if (p.ends === 'round') { longBand = U(longBand, circle(...c, w / 2, 64)); shortBand = U(shortBand, circle(...a, w / 2, 64)); }
56
+ return tidy(U(longBand, D(shortBand, grow(longBand, g))));
57
+ }
58
+ if (p.move === 'half') {
59
+ // a half disc, a bowl, with a smaller tick cut out of it, the long leg running out over its rim
60
+ const R = BOX.size * 0.5, top = BOX.cy - R * 0.36, L2 = R * 1.25, w2 = w * 0.78;
61
+ const p2 = tickPts(BOX.cx - R * 0.14, top + R * 0.62, L2, p), t2 = tick(p2, w2, p.ends);
62
+ const bowl = I(circle(BOX.cx, top, R, 180), rect(BOX.x0 - 4, top, BOX.size + 8, BOX.size));
63
+ return tidy(D(bowl, grow(t2, g * 0.5)));
64
+ }
65
+ const t = tick(pts, w, p.ends);
66
+ // a slab or a half disc (a bowl) under the tick, its top level a little above the short leg's tip: the tick cut out of
67
+ // it, open where the long leg runs out of the top (the leg drawn on above it left shards at the edge). The slab, a
68
+ // box with the tick running out of it, is the checked-box UI icon: by hand only
69
+ const top = pts[0][1] - w * 1.5, bottom = pts[1][1] + w * 1.2;
70
+ const body = p.move === 'half'
71
+ ? I(circle(BOX.cx, top, BOX.size * 0.46, 180), rect(BOX.x0 - 4, top, BOX.size + 8, BOX.size))
72
+ : poly([[BOX.x0 + BOX.size * 0.18, top], [BOX.x1, top], [BOX.x1 - BOX.size * 0.18, bottom], [BOX.x0, bottom]]);
73
+ return tidy(D(body, grow(t, g * 0.5)));
74
+ }
75
+
76
+ /** A heavy tick and its move. */
77
+ export const guard = {};
@@ -0,0 +1,13 @@
1
+ /** Clash: initials side by side in unlike builds, a heavy sans beside a Didone serif or a blackletter (./duo.js). */
2
+ import { SHARED, clash } from './duo.js';
3
+
4
+ /** @type {import('../index.js').Control[]} */
5
+ export const controls = [
6
+ SHARED.charA, SHARED.charB, SHARED.buildA, SHARED.buildB,
7
+ { key: 'join', label: 'Letters', type: 'choice', options: ['apart', 'interlock'], value: 'interlock' },
8
+ SHARED.charC, SHARED.weight, SHARED.gap,
9
+ ];
10
+
11
+ /** The mark for resolved params. */
12
+ export const build = clash;
13
+ export const guard = { maxPieces: 30, maxThinShare: 0.08, minInkShare: 0.08 };
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Cloud: a bold cloud, two to five round puffs on a flat or round base, unioned, with ONE move: cut into level bands,
3
+ * split by one slanted gap, a slot run in from one side, drawn as a heavy outline broken once, or stacked over a smaller
4
+ * cloud a gap above. The commonest infrastructure mark in the owner's tech-brand audit (2026-11-27), which the set
5
+ * lacked. Never rain, a bolt or a sun (weather icons): nothing is drawn under or behind the cloud, and no piece is a
6
+ * whole disc. A plain solid cloud is the cloud icon itself: by hand only.
7
+ */
8
+ import { U, D, I, rect, rr, circle, poly, grow } from '@logomarks/core/geometry';
9
+ import { BOX, GAP, tidy } from '../draw.js';
10
+
11
+ /** @type {import('../index.js').Control[]} */
12
+ export const controls = [
13
+ { key: 'puffs', label: 'Puffs', type: 'range', min: 2, max: 5, step: 1, value: 3 },
14
+ { key: 'base', label: 'Base', type: 'choice', options: ['flat', 'round'], value: 'flat' },
15
+ { key: 'rise', label: 'Tallest puff', type: 'choice', options: ['middle', 'left', 'right'], value: 'left' },
16
+ { key: 'move', label: 'Move', type: 'choice', options: ['bands', 'split', 'slot', 'outline', 'stack', 'none'], value: 'bands' },
17
+ { key: 'height', label: 'Height', type: 'range', min: 0.5, max: 0.78, step: 0.01, value: 0.62 },
18
+ { key: 'bands', label: 'Bands', type: 'range', min: 2, max: 4, step: 1, value: 2 },
19
+ { key: 'at', label: 'Cut at', type: 'range', min: 0.3, max: 0.7, step: 0.01, value: 0.5 },
20
+ { key: 'angle', label: 'Cut angle', type: 'range', min: -40, max: 40, step: 1, value: -24 },
21
+ { key: 'weight', label: 'Outline weight', type: 'range', min: 0.12, max: 0.2, step: 0.005, value: 0.15 },
22
+ { key: 'spacing', label: 'Gap', type: 'range', min: 1, max: 1.8, step: 0.05, value: 1.2 },
23
+ ];
24
+
25
+ /** Each puff's radius and centre, as shares of the cloud's width, for a count and which puff stands tallest. */
26
+ function puffsOf(n, rise) {
27
+ const P = {
28
+ 2: [[0.2, 0.3], [0.27, 0.64]],
29
+ 3: [[0.17, 0.25], [0.26, 0.54], [0.155, 0.8]],
30
+ 4: [[0.14, 0.2], [0.21, 0.42], [0.2, 0.64], [0.13, 0.84]],
31
+ 5: [[0.12, 0.15], [0.16, 0.32], [0.2, 0.5], [0.16, 0.68], [0.11, 0.85]],
32
+ }[n];
33
+ if (rise === 'right') return P;
34
+ if (rise === 'left') return P.map(([r, x]) => [r, 1 - x]).reverse();
35
+ // the tallest in the middle: the radii sorted onto the slots from the middle out
36
+ const rs = P.map(([r]) => r).sort((a, b) => b - a), mid = (n - 1) / 2;
37
+ const slots = P.map(([, x], k) => ({ x, d: Math.abs(k - mid) + k * 0.01 })).sort((a, b) => a.d - b.d);
38
+ return slots.map((sl, i) => [rs[i], sl.x]).sort((a, b) => a[1] - b[1]);
39
+ }
40
+
41
+ /** The cloud's height for a width: its tallest puff over its base. */
42
+ const cloudH = (w, p) => w * 0.26 * 0.95 + w * Math.max(...puffsOf(p.puffs, p.rise).map(([r]) => r)) * p.height / 0.62;
43
+
44
+ /** A cloud `w` wide with its bottom-left at (x0, y1): a round-ended base and its puffs standing on it. */
45
+ function cloud(x0, y1, w, p) {
46
+ const hb = w * 0.26, yc = y1 - hb * 0.95, k = p.height / 0.62;
47
+ const base = p.base === 'round' ? rr(x0, y1 - hb, w, hb, hb / 2) : rr(x0, y1 - hb, w, hb, [hb / 2, hb / 2, hb * 0.14, hb * 0.14]);
48
+ const puffs = puffsOf(p.puffs, p.rise).map(([r0, fx]) => {
49
+ const r = w * r0 * k, cx = Math.min(Math.max(x0 + w * fx, x0 + r), x0 + w - r);
50
+ return circle(cx, yc, r, 120);
51
+ });
52
+ // nothing hangs below the base
53
+ return I(U(base, ...puffs), rect(x0 - 4, BOX.y0 - BOX.size, w + 8, y1 - BOX.y0 + BOX.size));
54
+ }
55
+
56
+ /** The mark for resolved params. */
57
+ export function build(p) {
58
+ const W = BOX.size, g = GAP * p.spacing;
59
+ if (p.move === 'stack') {
60
+ // a smaller cloud a gap above a full one, its tallest puff on the other side
61
+ const w2 = W * 0.66, q = { ...p, rise: p.rise === 'left' ? 'right' : 'left', puffs: Math.max(2, p.puffs - 1) };
62
+ const h1 = cloudH(W, p), h2 = cloudH(w2, q), y1 = BOX.cy + (h1 + h2 + g) / 2;
63
+ const low = cloud(BOX.cx - W / 2, y1, W, p);
64
+ const high = cloud(BOX.cx - w2 / 2 + (p.rise === 'left' ? W * 0.1 : -W * 0.1), y1 - h1 - g * 0.4, w2, q);
65
+ return tidy(U(low, D(high, grow(low, g))));
66
+ }
67
+ const H = cloudH(W, p), x0 = BOX.cx - W / 2, y1 = BOX.cy + H / 2, c = cloud(x0, y1, W, p);
68
+ if (p.move === 'bands') {
69
+ // level gaps through the cloud, the bands of like height
70
+ // the cloud lifted off a strip of its own base by one gap, low in the base (cut at the base's top, a dome over a
71
+ // slab, it read as a burger); more bands cut the puffs level above it
72
+ const n = p.bands, hb = W * 0.26, foot = Math.max(GAP * 1.2, hb * 0.42), cuts = [rect(x0 - 8, y1 - foot - g, W + 16, g)];
73
+ const top = y1 - H, upper = H - foot - g, bandH = (upper - (n - 2) * g) / (n - 1);
74
+ for (let k = 1; k < n - 1; k++) cuts.push(rect(x0 - 8, top + k * bandH + (k - 1) * g, W + 16, g));
75
+ return tidy(D(c, U(...cuts)));
76
+ }
77
+ if (p.move === 'split') {
78
+ // one straight gap across the cloud at an angle, through its middle
79
+ const cy = y1 - H * p.at, t = Math.tan((p.angle * Math.PI) / 180), L = W * 0.8;
80
+ const cut = poly([[BOX.cx - L, cy - t * L - g / 2], [BOX.cx + L, cy + t * L - g / 2], [BOX.cx + L, cy + t * L + g / 2], [BOX.cx - L, cy - t * L + g / 2]]);
81
+ return tidy(D(c, cut));
82
+ }
83
+ if (p.move === 'slot') {
84
+ // a round-ended slot run in from the left end through the base, more than half the way across
85
+ const sh = g * 1.3, sy = y1 - W * 0.26 * 0.5 - sh / 2;
86
+ return tidy(D(c, rr(x0 - W, sy, W + W * (0.38 + p.at * 0.36), sh, sh / 2)));
87
+ }
88
+ if (p.move === 'outline') {
89
+ // a heavy outline, broken once on the base's right half
90
+ const t = W * p.weight, ring = D(c, grow(c, -t));
91
+ const bx = x0 + W * (0.5 + p.at * 0.3);
92
+ return tidy(D(ring, rect(bx, y1 - t - 4, g, t + 8)));
93
+ }
94
+ return tidy(c);
95
+ }
96
+
97
+ /** One cloud and its cuts. */
98
+ export const guard = {};
@@ -0,0 +1,14 @@
1
+ /** Crossover: one initial as a solid letter running into the other's block, ink outside it and cut out inside (./duo.js). */
2
+ import { SHARED, crossover } from './duo.js';
3
+
4
+ /** @type {import('../index.js').Control[]} */
5
+ export const controls = [
6
+ SHARED.charA, SHARED.charB, SHARED.buildA, SHARED.buildB,
7
+ { ...SHARED.box, options: ['rounded', 'square'] },
8
+ { key: 'overlap', label: 'Crossing', type: 'range', min: 0.2, max: 0.45, step: 0.01, value: 0.32 },
9
+ SHARED.weight, SHARED.gap,
10
+ ];
11
+
12
+ /** The mark for resolved params. */
13
+ export const build = crossover;
14
+ export const guard = { maxPieces: 30, maxThinShare: 0.08, minInkShare: 0.12 };
@@ -0,0 +1,395 @@
1
+ /**
2
+ * Contrast monograms: two or three initials (or the two halves of one) drawn on purpose in UNLIKE ways. One letter
3
+ * knocked out of a box beside one left open; each in its own ring, one solid and one outlined; a split badge with one
4
+ * cell filled; a heavy sans beside a Didone serif or a blackletter. The shared engine for the five monogram recipes
5
+ * (duo, crossover, tucked, clash, splitchar) and `monograms()`, which makes a page of them from typed initials.
6
+ *
7
+ * Each side is a letter in one of the letter builds (core's geometric sans skeleton solid, core's Didone serif and
8
+ * blackletter, or the Letter recipe's stencil, route, cut, wedge, blocks, rails and tiles) and one treatment: solid
9
+ * (the ink letter), knockout (the letter cut from a filled container) or outline (an ink letter in a container rim).
10
+ * A knocked-out letter is always a heavy build: a serif's hairlines cut from a block close up at 32 px.
11
+ */
12
+ import { U, D, I, rect, rr, circle, poly, mapPts, bbox, grown, skelSolid, robust, area } from '@logomarks/core/geometry';
13
+ import { drawn, SERIF_GLYPHS, BLACKLETTERS, blackLetter } from '@logomarks/core/letters';
14
+ import { build as letterBuild, skeleton, CHARS } from './letter.js';
15
+ import { GAP, clear, tidy } from '../draw.js';
16
+ import { fill, morph } from '../raster.js';
17
+
18
+ robust();
19
+
20
+ /** The cell a side is drawn in, before fitting (the whole mark is fitted to the 448 box afterwards). */
21
+ export const S = 200;
22
+ /** Every character a side can be. */
23
+ export const PAIR_CHARS = CHARS;
24
+ /** A third initial's control: none, or a character. */
25
+ export const THIRD = ['-', ...CHARS];
26
+ /** The letter builds a side can take. */
27
+ export const BUILDS = ['sans', 'serif', 'blackletter', 'stencil', 'route', 'cut', 'wedge', 'blocks', 'rails', 'tiles'];
28
+ /** The heavy builds: the ones a knockout uses (and a split's first half). */
29
+ export const HEAVY = ['sans', 'cut', 'wedge', 'blocks', 'route', 'stencil', 'tiles'];
30
+ /** The contrast builds: what a shuffle sets against a heavy one. */
31
+ export const CONTRAST = ['serif', 'blackletter', 'rails', 'serif', 'stencil'];
32
+
33
+ /**
34
+ * Initials never drawn: other companies' monogram logos (LV, CC, GG, DG, YSL, VW, HP, GE, MK, CK, HM, DC, NY, LA, IBM,
35
+ * BMW, KFC) and hate codes (SS, HH, KKK, 88). Matched on the characters as typed, in order.
36
+ */
37
+ export const BLOCKED = ['LV', 'CC', 'GG', 'DG', 'YSL', 'VW', 'HP', 'GE', 'MK', 'CK', 'HM', 'DC', 'NY', 'LA', 'IBM', 'BMW', 'KFC', 'SS', 'HH', 'KKK', '88'];
38
+
39
+ /** Rude or offensive reads, typed or made by a turn: profanity initials and slurs. Blocked like `BLOCKED`. */
40
+ export const RUDE = ['FU', 'FK', 'FCK', 'FUK', 'FFS', 'WTF', 'STFU', 'GTFO', 'KYS', 'FML', 'BS', 'SOB', 'ASS', 'FAG', 'NIG', 'NGR', 'DIK', 'CUM', 'SEX', 'XXX', 'POO', 'PEE', 'NAZ', '1488', '14'];
41
+
42
+ /** Whether a run of characters is one of the blocked initials or a rude read. */
43
+ export const blocked = (chars) => { const t = (Array.isArray(chars) ? chars : [...String(chars)]).join('').toUpperCase(); return BLOCKED.includes(t) || RUDE.includes(t); };
44
+
45
+ /** The characters a monogram's params name, the third left out when it is '-'. */
46
+ export const charsOf = (p) => [p.charA, p.charB, p.charC].filter((c) => c && c !== '-').map(String);
47
+
48
+ /** A shape as a list of polygons. */
49
+ const asShape = (s) => (!s || !s.length ? [] : typeof s[0][0][0] === 'number' ? [s] : s);
50
+
51
+ /** A letter's glyph in a build, at any size and place (it is placed afterwards). Builds a letter lacks fall back to the sans. */
52
+ export function glyph(ch, build, weight = 0.2) {
53
+ const c = String(ch);
54
+ if (build === 'serif' && SERIF_GLYPHS[c]) return asShape(drawn(c)(380, { S: Math.round(380 * (0.16 + weight * 0.42)), h: 52 }).s);
55
+ if (build === 'blackletter' && BLACKLETTERS[c]) return asShape(blackLetter(c, GAP));
56
+ if (build === 'sans' || build === 'serif' || build === 'blackletter') return asShape(skelSolid(null, 400, weight * 448, skeleton(c, 400)));
57
+ return asShape(letterBuild({ char: c, build, weight, slant: 0, spacing: 1.2, soft: 1 }));
58
+ }
59
+
60
+ /** A shape scaled to fit `w` × `h` (keeping its proportions) and centred on (cx, cy). */
61
+ export function place(shape, cx, cy, h, w) {
62
+ const s = asShape(shape);
63
+ if (!s.length) return [];
64
+ const [x0, y0, x1, y1] = bbox(s), k = Math.min(h / Math.max(y1 - y0, 1e-6), w / Math.max(x1 - x0, 1e-6));
65
+ return mapPts(s, ([x, y]) => [cx + (x - (x0 + x1) / 2) * k, cy + (y - (y0 + y1) / 2) * k]);
66
+ }
67
+
68
+ /** A container: a square, a rounded square or a circle (an ellipse-ended pill when it isn't square). */
69
+ export function container(kind, cx, cy, w, h) {
70
+ if (kind === 'circle') return Math.abs(w - h) < 1e-6 ? circle(cx, cy, w / 2, 160) : rr(cx - w / 2, cy - h / 2, w, h, Math.min(w, h) / 2);
71
+ if (kind === 'rounded') return rr(cx - w / 2, cy - h / 2, w, h, Math.min(w, h) * 0.24);
72
+ return rect(cx - w / 2, cy - h / 2, w, h);
73
+ }
74
+
75
+ /** A letter's build for a treatment: a knockout always heavy. */
76
+ const buildFor = (build, treat) => (treat === 'knockout' && !HEAVY.includes(build) ? 'sans' : build);
77
+
78
+ /**
79
+ * One side: `ch` in `build`, treated `treat` ('solid', 'knockout' or 'outline') in a `kind` container `w` × `h` at
80
+ * (cx, cy). Returns the side's ink and its container (for clearing the next side from it).
81
+ */
82
+ export function side(ch, build, treat, kind, cx, cy, w, h, p) {
83
+ const box = container(kind, cx, cy, w, h), round = kind === 'circle';
84
+ if (treat === 'solid') return { ink: place(glyph(ch, build, p.weight), cx, cy, h * 0.92, w * 0.92), box };
85
+ if (treat === 'knockout') {
86
+ const L = place(glyph(ch, buildFor(build, treat), p.weight), cx, cy, h * (round ? 0.5 : 0.58), w * (round ? 0.56 : 0.66));
87
+ return { ink: D(box, L), box };
88
+ }
89
+ const t = Math.max(GAP, p.rim * S), inner = container(kind, cx, cy, w - 2 * t, h - 2 * t), ring = D(box, inner);
90
+ const L = place(glyph(ch, build, p.weight), cx, cy, (h - 2 * t) * (round ? 0.58 : 0.66), (w - 2 * t) * (round ? 0.62 : 0.7));
91
+ return { ink: U(ring, clear(L, ring, GAP * p.gap)), box };
92
+ }
93
+
94
+ /** The treatments of each side, from A's and B's (a third side takes A's). */
95
+ const treatsOf = (p, n) => [...Array(n)].map((_, i) => (i === 1 ? p.treatB : p.treatA));
96
+ /** The builds of each side, from A's and B's (a third side takes A's). */
97
+ const buildsOf = (p, n) => [...Array(n)].map((_, i) => (i === 1 ? p.buildB : p.buildA));
98
+
99
+ /** Round letters: two rings of them side by side read as a pair of eyes or glasses. */
100
+ const ROUND = 'O0QCGD';
101
+
102
+ /**
103
+ * Boxed, rings or cells for two or three characters.
104
+ * - boxed: the sides side by side, a gap apart, each in its own treatment (a knocked-out box beside an open letter);
105
+ * - rings: each side in a circle, apart or overlapping (the later one passing behind, cleared by the gap); round letters
106
+ * in rings read as eyes, so they take rounded squares;
107
+ * - cells: one container split into cells by the gap, the first (and third) cell filled with its letter knocked out,
108
+ * the other open with an ink letter in its share of the rim.
109
+ */
110
+ export function pairs(p) {
111
+ if (p.layout === 'turned') return turned(p);
112
+ const chars = charsOf(p), n = chars.length, g = GAP * p.gap;
113
+ if (blocked(chars) || n < 2) return [];
114
+ const builds = buildsOf(p, n);
115
+ if (p.layout === 'cells') {
116
+ const kind = p.box === 'circle' ? 'rounded' : p.box, W = n * S + (n - 1) * g, outer = container(kind, W / 2, S / 2, W, S);
117
+ const t = Math.max(GAP, p.rim * S), inner = container(kind, W / 2, S / 2, W - 2 * t, S - 2 * t), parts = [];
118
+ for (let i = 0; i < n; i++) {
119
+ const x0 = i * (S + g), x1 = x0 + S, region = rect(i ? x0 : -S, -S, (i === n - 1 ? W + S : x1) - (i ? x0 : -S), 3 * S);
120
+ const cell = I(outer, region), cx = (x0 + x1) / 2;
121
+ if (i % 2 === 0) parts.push(D(cell, place(glyph(chars[i], buildFor(builds[i], 'knockout'), p.weight), cx, S / 2, S * 0.58, S * 0.66)));
122
+ else {
123
+ const frame = D(cell, inner), L = place(glyph(chars[i], builds[i], p.weight), cx, S / 2, (S - 2 * t) * 0.66, (S - 2 * t) * 0.7);
124
+ parts.push(frame, clear(L, frame, g));
125
+ }
126
+ }
127
+ return tidy(U(...parts), { share: 0.003, width: 9 });
128
+ }
129
+ const treats = treatsOf(p, n);
130
+ const rings = p.layout === 'rings', kind = rings ? (chars.every((c) => ROUND.includes(c)) ? 'rounded' : 'circle') : p.box;
131
+ const step = rings && p.join === 'overlap' ? S * 0.88 : S + g;
132
+ let acc = [], prev = null;
133
+ for (let i = 0; i < n; i++) {
134
+ const sd = side(chars[i], builds[i], treats[i], kind, S / 2 + i * step, S / 2, S, S, p);
135
+ acc = prev && rings && p.join === 'overlap' ? U(acc, clear(sd.ink, prev, g)) : U(acc, sd.ink);
136
+ prev = sd.box;
137
+ }
138
+ return tidy(acc, { share: 0.003, width: 9 });
139
+ }
140
+
141
+ /** A shape's ink: its outlines' area less its holes'. */
142
+ const inkOf = (shape) => shape.reduce((t, pg) => t + area(pg[0]) - pg.slice(1).reduce((h, r) => h + area(r), 0), 0);
143
+
144
+ /**
145
+ * Crossover: A as a solid letter running into B's block. Outside the block A is ink (kept a gap from it); inside, A is
146
+ * cut out of the block, and B is cut out of the block beside it.
147
+ */
148
+ export function crossover(p) {
149
+ const [a, b] = charsOf(p), g = GAP * p.gap;
150
+ if (!a || !b || blocked([a, b])) return [];
151
+ const kind = p.box === 'circle' ? 'rounded' : p.box;
152
+ const LA = place(glyph(a, buildFor(p.buildA, 'knockout'), p.weight), S * 0.45, S / 2, S, S * 0.9), [ax0, , ax1] = bbox(LA);
153
+ // A must still read outside the block: the block's edge (and the gap before it) mustn't take a whole stroke, so the
154
+ // overlap moves, nearest first, until at least 68% of A's ink is outside, cleared (an M whose last stem falls in the
155
+ // gap is an I); failing that, the overlap that leaves the most
156
+ const Wb = S * 1.15, total = inkOf(LA), at = (k) => {
157
+ const left = ax1 - p.overlap * k * (ax1 - ax0), block = container(kind, left + Wb / 2, S / 2, Wb, S);
158
+ return { left, block, share: inkOf(D(LA, grown(block, g))) / total };
159
+ };
160
+ let best = null;
161
+ for (const k of [1, 1.25, 0.8, 1.5, 0.6, 1.75]) {
162
+ const c = at(k);
163
+ if (!best || c.share > best.share) best = c;
164
+ if (c.share >= 0.68) { best = c; break; }
165
+ }
166
+ const { left, block } = best, inside = I(LA, block), room = Wb - (ax1 - left) - g;
167
+ const LB = place(glyph(b, buildFor(p.buildB, 'knockout'), p.weight), ax1 + g + room / 2, S / 2, S * 0.58, Math.max(S * 0.3, room * 0.82));
168
+ return tidy(U(D(LA, grown(block, g)), D(block, U(inside, LB))), { share: 0.006, width: 16 });
169
+ }
170
+
171
+ /**
172
+ * Tucked: A big and solid; B (and C) small, each in a small box at A's lower (or upper) right corner, the boxes
173
+ * overlapping A's edge and A cleared from them by the gap. A small side's treatment is B's: knockout, outline, or solid
174
+ * (the small letter on its own, A cleared from it).
175
+ */
176
+ export function tucked(p) {
177
+ const chars = charsOf(p), [a, ...rest] = chars, g = GAP * p.gap;
178
+ if (!a || !rest.length || blocked(chars)) return [];
179
+ const LA = place(glyph(a, p.buildA, p.weight), S / 2, S / 2, S, S * 0.95), [, ay0, ax1, ay1] = bbox(LA), s = S * p.size;
180
+ const smalls = [], boxes = [];
181
+ rest.forEach((ch, i) => {
182
+ const cx = ax1 - s * 0.25 + s / 2, cy = p.corner === 'top' ? ay0 + s / 2 + i * (s + g) : ay1 - s / 2 - i * (s + g);
183
+ const sd = side(ch, p.buildB, p.treatB, p.box, cx, cy, s, s, p);
184
+ smalls.push(sd.ink);
185
+ boxes.push(p.treatB === 'solid' ? sd.ink : sd.box);
186
+ });
187
+ return tidy(U(D(LA, grown(U(...boxes), g)), ...smalls), { share: 0.003, width: 9 });
188
+ }
189
+
190
+ /**
191
+ * Clash: the letters side by side with no container, each in a different build (a heavy sans beside a Didone serif or a
192
+ * blackletter), matched to one cap height. Apart (a gap between their boxes) or interlocked (the second laid over the
193
+ * first by up to 22% of its width, cleared from it by the gap, eased back until it keeps 90% of its ink).
194
+ */
195
+ export function clash(p) {
196
+ const chars = charsOf(p), g = GAP * p.gap;
197
+ if (chars.length < 2 || blocked(chars)) return [];
198
+ const builds = buildsOf(p, chars.length);
199
+ let acc = [], x = 0, prev = null;
200
+ chars.forEach((ch, i) => {
201
+ const L0 = place(glyph(ch, builds[i], p.weight), 0, S / 2, S, S * 1.1), [x0, , x1] = bbox(L0), w = x1 - x0, total = inkOf(L0);
202
+ let L = mapPts(L0, ([px, py]) => [px - x0, py]), kept = L;
203
+ if (i > 0) {
204
+ // interlocked, the later letter laid over the earlier by up to 22% of its width, eased back until the clear
205
+ // leaves it 90% of its ink (a T cleared of an arm is an I); apart, a gap between them
206
+ // (a T or an I, all arm or stem, never interlocks: any clear makes a T an I)
207
+ for (const k of p.join === 'interlock' && !'TI'.includes(ch) ? [0.22, 0.15, 0.08, -g / w] : [-g / w]) {
208
+ L = mapPts(L0, ([px, py]) => [px + x - x0 - w * k, py]);
209
+ kept = k > 0 ? clear(L, prev, g) : L;
210
+ if (k <= 0 || inkOf(kept) >= total * 0.9) break;
211
+ }
212
+ }
213
+ acc = U(acc, kept);
214
+ x = bbox(L)[2];
215
+ prev = L;
216
+ });
217
+ return tidy(acc, { share: 0.003, width: 9 });
218
+ }
219
+
220
+ /**
221
+ * A letter turned: by a quarter turn ('90', '180', '270') about its own middle, or mirrored ('mirror'), at the origin.
222
+ */
223
+ export function turnLetter(shape, turn) {
224
+ if (!turn || turn === '0') return shape;
225
+ const [x0, y0, x1, y1] = bbox(shape), cx = (x0 + x1) / 2, cy = (y0 + y1) / 2;
226
+ if (turn === 'mirror') return mapPts(shape, ([x, y]) => [2 * cx - x, y]).map((pg) => pg.map((r) => r.slice().reverse()));
227
+ const a = (Number(turn) * Math.PI) / 180, c = Math.round(Math.cos(a)), s = Math.round(Math.sin(a));
228
+ return mapPts(shape, ([x, y]) => [cx + (x - cx) * c - (y - cy) * s, cy + (x - cx) * s + (y - cy) * c]);
229
+ }
230
+
231
+ /**
232
+ * Turns that make a letter another real letter (and so the pair another pair, or a word): an M upside down is a W, an N on
233
+ * its side a Z, a 6 upside down a 9; an A, V or Y on its side is an arrowhead, a J upside down a padlock's shackle over
234
+ * the other letter. Such a turn is moved on to the next one that doesn't.
235
+ */
236
+ export const BECOMES = {
237
+ A: { 180: 'V', 90: '<', 270: '>' }, V: { 180: 'A', 90: '>', 270: '<' }, Y: { 90: '>', 270: '<', 180: 'λ' },
238
+ M: { 180: 'W', 90: 'E', 270: 'E' }, W: { 180: 'M', 90: 'E', 270: 'E' }, N: { 90: 'Z', 270: 'Z' }, Z: { 90: 'N', 270: 'N', mirror: 'S' }, S: { mirror: 'Z' },
239
+ 6: { 180: '9' }, 9: { 180: '6' }, U: { 180: 'n', 90: 'C', 270: 'C' }, C: { 90: 'U', 270: 'n' }, E: { 90: 'm', 270: 'w' },
240
+ P: { mirror: 'q' }, L: { 180: '7' }, 7: { 180: 'L' }, J: { mirror: 'L', 180: 'ʃ', 90: 'U', 270: 'C' }, K: { 90: 'ʞ', 270: 'ʞ' },
241
+ };
242
+ /** The turn a letter takes for an asked turn: the asked one, or the next of 90, 270, 180, mirror, none that keeps it itself. */
243
+ export function safeTurn(ch, turn) {
244
+ const order = [turn, '90', '270', '180', 'mirror', '0'];
245
+ return order.find((t) => t === '0' || !(BECOMES[ch] && BECOMES[ch][t])) || '0';
246
+ }
247
+ /**
248
+ * What a letter LOOKS like once turned, where that is near enough another letter to be read as one (each a string of
249
+ * the letters it may pass for): a P or a D on its side a U, a C a U, an N a Z, an M upside down a W, an E on its side
250
+ * an M or a W… A turned letter may still be read as itself, too (nested, an F on its side and a P's stem make an F
251
+ * again), so it reads as itself and what it looks like.
252
+ */
253
+ export const LOOKS = {
254
+ P: { 90: 'UN', 270: 'UN', 180: 'D', mirror: 'Q' }, D: { 90: 'U', 270: 'UN', mirror: 'C' }, C: { 90: 'U', 270: 'UN', 180: 'D', mirror: 'D' },
255
+ U: { 90: 'C', 270: 'CD', 180: 'N' }, N: { 90: 'Z', 270: 'Z' }, Z: { 90: 'N', 270: 'N', mirror: 'S' }, S: { mirror: 'Z', 90: 'N', 270: 'N' },
256
+ M: { 180: 'W', 90: 'E', 270: 'E' }, W: { 180: 'M', 90: 'E', 270: 'E' }, E: { 90: 'MW', 270: 'MW', mirror: '3' }, L: { 180: '7', mirror: 'J', 90: 'J', 270: '7' },
257
+ J: { mirror: 'L', 180: 'L', 90: 'U', 270: 'C' }, A: { 180: 'V' }, V: { 180: 'A' }, 6: { 180: '9' }, 9: { 180: '6' }, K: { 180: 'K' }, G: { 90: 'U' }, B: { 90: 'M', 270: 'W' },
258
+ F: { 180: 'J' }, T: { 180: 'L' }, Y: { 180: 'L' }, R: { mirror: 'K' },
259
+ };
260
+ /** The letters a character may be read as, turned `turn`. */
261
+ export const readsOf = (ch, turn) => (!turn || turn === '0' ? ch : ch + (LOOKS[ch]?.[turn] ?? ''));
262
+ /** Whether two turned letters read, in either order, as blocked initials or a rude read. */
263
+ export const readsBlocked = (a, ta, b, tb) => {
264
+ for (const x of readsOf(a, ta)) for (const y of readsOf(b, tb)) if (blocked([x, y]) || blocked([y, x])) return true;
265
+ return false;
266
+ };
267
+
268
+ /** Pairs never turned and nested: two T's or two L's lock into a cross or a hooked turn; an X turned is still an X. */
269
+ const NO_TURN = /^(TT|LL|X.|.X|\+)$/;
270
+
271
+ /** The share of the smaller of two boxes that the two overlap. */
272
+ const overlapShare = (a, b) => {
273
+ const w = Math.max(0, Math.min(a[2], b[2]) - Math.max(a[0], b[0])), h = Math.max(0, Math.min(a[3], b[3]) - Math.max(a[1], b[1]));
274
+ return (w * h) / Math.min((a[2] - a[0]) * (a[3] - a[1]), (b[2] - b[0]) * (b[3] - b[1]));
275
+ };
276
+
277
+ /**
278
+ * Turned: two letters in one build at one light weight, one (or both) turned or mirrored, then nested so their strokes
279
+ * lock together: the second slid (and, if it helps, set a little smaller) to the place that packs the two tightest
280
+ * without touching, the gap kept between them (a raster search). A place where the two boxes overlap (one letter reaching
281
+ * into the other's room, a bar over the other's arm) beats one where they only sit side by side, and an edge of one lined
282
+ * up with an edge of the other counts for a little. The letters are extended (drawn wider) first, so their arms reach.
283
+ */
284
+ export function turned(p) {
285
+ const [a, b] = charsOf(p), g = GAP * p.gap, w = p.weight * 0.72;
286
+ if (!a || !b || blocked([a, b]) || NO_TURN.test(a + b)) return [];
287
+ const wide = (s) => mapPts(s, ([x, y]) => [x * p.stretch, y]);
288
+ // nested, the bitmap and stencil builds' steps and breaks tangle: a turned pair is drawn in a line build
289
+ const bld = ['sans', 'cut', 'serif', 'rails'].includes(p.buildA) ? p.buildA : 'sans';
290
+ const ta = safeTurn(a, p.turnA), tb = safeTurn(b, p.turnB);
291
+ // the pair as it READS once turned (a P on its side looks like a U, so F with it is FU): never a blocked or rude read,
292
+ // in either order
293
+ if (readsBlocked(a, ta, b, tb)) return [];
294
+ const LA = turnLetter(place(wide(glyph(a, bld, w)), 0, 0, S, S * 1.4), ta);
295
+ const B0 = turnLetter(place(wide(glyph(b, bld, w)), 0, 0, S, S * 1.4), tb);
296
+ const N = 120, span = S * 3.2, px = span / N, toPx = (s) => mapPts(s, ([x, y]) => [((x + span / 2) / span) * 512, ((y + span / 2) / span) * 512]);
297
+ const A = morph(fill(toPx(LA), N), N, Math.ceil(g / px) + 1, false), boxA = bbox(LA); // a pixel over the gap, so the exact clear below trims nothing
298
+ let best = null;
299
+ for (const k of [1, 0.9, 0.8]) {
300
+ const LB0 = k === 1 ? B0 : mapPts(B0, ([x, y]) => [x * k, y * k]), B = fill(toPx(LB0), N), boxB = bbox(LB0);
301
+ const cells = []; for (let i = 0; i < B.length; i++) if (B[i]) cells.push(i);
302
+ for (let dy = -S * 1.1; dy <= S * 1.1; dy += px) for (let dx = -S * 1.2; dx <= S * 1.2; dx += px) {
303
+ const ox = Math.round(dx / px), oy = Math.round(dy / px);
304
+ let hit = false;
305
+ for (const i of cells) { const x = (i % N) + ox, y = ((i / N) | 0) + oy; if (x < 0 || y < 0 || x >= N || y >= N || A[y * N + x]) { hit = true; break; } }
306
+ if (hit) continue;
307
+ const bb = [boxB[0] + dx, boxB[1] + dy, boxB[2] + dx, boxB[3] + dy];
308
+ const X0 = Math.min(boxA[0], bb[0]), X1 = Math.max(boxA[2], bb[2]), Y0 = Math.min(boxA[1], bb[1]), Y1 = Math.max(boxA[3], bb[3]);
309
+ const W = X1 - X0, H = Y1 - Y0, area = W * H * (1 + (Math.abs(W - H) / Math.max(W, H)) * 0.35);
310
+ const nest = overlapShare(boxA, bb), line = [bb[1] - boxA[1], bb[3] - boxA[3], bb[1] - boxA[3], bb[3] - boxA[1], bb[0] - boxA[0], bb[2] - boxA[2]].some((d) => Math.abs(d) < px * 1.5);
311
+ const score = area * (nest > 0.25 ? 0.82 : nest > 0.1 ? 0.92 : 1.15) * (line ? 0.94 : 1) * (k === 1 ? 1 : k === 0.9 ? 1.04 : 1.1);
312
+ if (!best || score < best.score) best = { score, dx, dy, k };
313
+ }
314
+ }
315
+ if (!best) return [];
316
+ const LB = mapPts(B0, ([x, y]) => [x * best.k + best.dx, y * best.k + best.dy]);
317
+ // no detached crumb: a small piece left in a crotch or over a curve is an eye (JM's M over the J's bowl is a face)
318
+ const out = tidy(U(LA, clear(LB, LA, g)), { share: 0.004, width: 9 }), all = inkOf(out), [mx0, my0, mx1, my1] = bbox(out);
319
+ const big = Math.max(mx1 - mx0, my1 - my0);
320
+ // crumbs (under 6% of the ink) go; a bigger piece that is still small across (under 30% of the mark) is a dot or a
321
+ // stub the nesting cut off a letter: such an arrangement isn't drawn, rather than drawn with a letter maimed
322
+ const kept = out.filter((pg) => inkOf([pg]) >= all * 0.06);
323
+ return kept.some((pg) => { const [x0, y0, x1, y1] = bbox([pg]); return Math.max(x1 - x0, y1 - y0) < big * 0.3; }) ? [] : kept;
324
+ }
325
+
326
+ /** A half-plane: the points on the `side` (1 or -1) of the line through (cx, cy) at `deg`, set back by `off`. */
327
+ function halfPlane(cx, cy, deg, side, off) {
328
+ const a = (deg * Math.PI) / 180, nx = -Math.sin(a), ny = Math.cos(a), R = 4000, ox = cx + nx * off * side, oy = cy + ny * off * side;
329
+ const dx = Math.cos(a) * R, dy = Math.sin(a) * R;
330
+ return poly([[ox - dx, oy - dy], [ox + dx, oy + dy], [ox + dx + nx * R * side, oy + dy + ny * R * side], [ox - dx + nx * R * side, oy - dy + ny * R * side]]);
331
+ }
332
+
333
+ /** Letters whose slanted strokes, split upright, make a gun's grip and barrel. */
334
+ export const GRIP = /^[AVWYKXMN4]$/;
335
+
336
+ /**
337
+ * Split letter: one character cut in two along an axis (upright, level or diagonal), the halves a gap apart: the first
338
+ * half the ink letter, the second either the letter cut out of its half of a container (knockout) or the same letter in
339
+ * another build (build: a sans half beside a serif half).
340
+ */
341
+ export function splitchar(p) {
342
+ const ch = String(p.charA), g = GAP * p.gap;
343
+ if (blocked([ch])) return [];
344
+ // a letter of slanted strokes split upright is a pistol: the half body (or half letter) a grip, the slanted stroke
345
+ // running out of it a barrel. Never drawn, in any body or build
346
+ if (GRIP.test(ch) && p.axis === 'upright') return [];
347
+ const A = place(glyph(ch, buildFor(p.buildA, 'knockout'), p.weight), 0, 0, S, S * 1.2), [x0, y0, x1, y1] = bbox(A);
348
+ const deg = p.axis === 'level' ? 0 : p.axis === 'diagonal' ? 60 : 90;
349
+ const near = halfPlane(0, 0, deg, -1, g / 2), far = halfPlane(0, 0, deg, 1, g / 2);
350
+ const first = I(A, near);
351
+ if (p.treatB === 'build') {
352
+ const B = place(glyph(ch, p.buildB, p.weight), 0, 0, y1 - y0, x1 - x0);
353
+ return tidy(U(first, I(B, far)), { share: 0.006, width: 14 });
354
+ }
355
+ // an H knocked out of a disc is a helipad, a P out of a square a car park: each takes the other container
356
+ const kind = ch === 'H' && p.box === 'circle' ? 'rounded' : ch === 'P' && p.box !== 'circle' ? 'circle' : p.box;
357
+ const pad = S * 0.14, box = container(kind, (x0 + x1) / 2, (y0 + y1) / 2, x1 - x0 + 2 * pad, y1 - y0 + 2 * pad);
358
+ return tidy(U(first, D(I(box, far), A)), { share: 0.006, width: 14 });
359
+ }
360
+
361
+ /** The controls every monogram recipe shares (each recipe takes the ones it uses). */
362
+ export const SHARED = {
363
+ charA: { key: 'charA', label: 'First initial', type: 'choice', options: PAIR_CHARS, value: 'J' },
364
+ charB: { key: 'charB', label: 'Second initial', type: 'choice', options: PAIR_CHARS, value: 'M' },
365
+ charC: { key: 'charC', label: 'Third initial', type: 'choice', options: THIRD, value: '-' },
366
+ buildA: { key: 'buildA', label: 'First letter build', type: 'choice', options: BUILDS, value: 'sans' },
367
+ buildB: { key: 'buildB', label: 'Second letter build', type: 'choice', options: BUILDS, value: 'serif' },
368
+ treatA: { key: 'treatA', label: 'First treatment', type: 'choice', options: ['knockout', 'solid', 'outline'], value: 'knockout' },
369
+ treatB: { key: 'treatB', label: 'Second treatment', type: 'choice', options: ['solid', 'knockout', 'outline'], value: 'solid' },
370
+ // `box`, not `container`: the finish has a `container` (a badge round the whole mark)
371
+ box: { key: 'box', label: 'Container', type: 'choice', options: ['rounded', 'square', 'circle'], value: 'rounded' },
372
+ weight: { key: 'weight', label: 'Weight', type: 'range', min: 0.14, max: 0.26, step: 0.005, value: 0.2 },
373
+ rim: { key: 'rim', label: 'Rim', type: 'range', min: 0.08, max: 0.16, step: 0.005, value: 0.11 },
374
+ gap: { key: 'gap', label: 'Gaps', type: 'range', min: 1, max: 2, step: 0.05, value: 1.2 },
375
+ };
376
+
377
+ /* ---------- the Duo recipe (boxed, rings, cells) ---------- */
378
+
379
+ /** @type {import('../index.js').Control[]} */
380
+ export const controls = [
381
+ SHARED.charA, SHARED.charB,
382
+ { key: 'layout', label: 'Layout', type: 'choice', options: ['boxed', 'rings', 'cells', 'turned'], value: 'boxed' },
383
+ SHARED.treatA, SHARED.treatB, SHARED.buildA, SHARED.buildB, SHARED.box,
384
+ { key: 'join', label: 'Rings', type: 'choice', options: ['apart', 'overlap'], value: 'apart' },
385
+ { key: 'turnA', label: 'Turn first (turned)', type: 'choice', options: ['0', '90', '180', '270', 'mirror'], value: '270' },
386
+ { key: 'turnB', label: 'Turn second (turned)', type: 'choice', options: ['0', '90', '180', '270', 'mirror'], value: '90' },
387
+ { key: 'stretch', label: 'Width (turned)', type: 'range', min: 1, max: 1.6, step: 0.05, value: 1.35 },
388
+ SHARED.charC, SHARED.weight, SHARED.rim, SHARED.gap,
389
+ ];
390
+
391
+ /** The mark for resolved params. */
392
+ export const build = pairs;
393
+
394
+ /** Two letters and their containers: more pieces than a plain mark, and serif hairlines a little thin. */
395
+ export const guard = { maxPieces: 34, maxThinShare: 0.06, minInkShare: 0.1 };
@@ -56,6 +56,16 @@ import * as ribbon from './ribbon.js';
56
56
  import * as field from './field.js';
57
57
  import * as zigzag from './zigzag.js';
58
58
  import * as halfstripe from './halfstripe.js';
59
+ import * as cloud from './cloud.js';
60
+ import * as layers from './layers.js';
61
+ import * as bubble from './bubble.js';
62
+ import * as check from './check.js';
63
+ import * as peak from './peak.js';
64
+ import * as duo from './duo.js';
65
+ import * as crossover from './crossover.js';
66
+ import * as tucked from './tucked.js';
67
+ import * as clash from './clash.js';
68
+ import * as splitchar from './splitchar.js';
59
69
  import { FINISH, finish } from '../finish.js';
60
70
  import { TUNING } from '../tuning.js';
61
71
 
@@ -121,5 +131,15 @@ export const RECIPES = {
121
131
  ribbon: R('ribbon', 'Ribbon', 'One thick band folding back with round turns and a slot.', ribbon),
122
132
  field: R('field', 'Bar Field', 'A field of upright bars broken by one stepped line.', field),
123
133
  zigzag: R('zigzag', 'Zigzag', 'A striped shape broken by a zigzag, one side slid.', zigzag),
134
+ cloud: R('cloud', 'Cloud', 'Puffs on a base with one move: bands, a split, a slot, an outline or a stack.', cloud),
135
+ layers: R('layers', 'Layers', 'Two to four plates stacked with the gap between, flat or with a thickness.', layers),
136
+ bubble: R('bubble', 'Bubble', 'A speech bubble with one move: a parted tail, a pair, bands, a cut-out or a fold.', bubble),
137
+ check: R('check', 'Check', 'A heavy tick with one move: a parted heel, doubled, cut from a shape, or folded.', check),
138
+ peak: R('peak', 'Peak', 'The letter A as a peak: two heavy legs, no crossbar, with one move.', peak),
139
+ duo: R('duo', 'Duo', 'Two initials in unlike treatments: one boxed, one open; each in a ring; or a split badge.', duo),
140
+ crossover: R('crossover', 'Crossover', 'One initial running into the other\'s block, ink outside and cut out inside.', crossover),
141
+ tucked: R('tucked', 'Tucked', 'A big initial with a small one boxed at its corner.', tucked),
142
+ clash: R('clash', 'Type Clash', 'Initials side by side in unlike type: a heavy sans and a serif or blackletter.', clash),
143
+ splitchar: R('splitchar', 'Split Letter', 'One letter cut in two, each half treated another way.', splitchar),
124
144
  halfstripe: R('halfstripe', 'Half Stripe', 'A shape half solid, half bars stepping down.', halfstripe),
125
145
  };