@logomarks/typemarks 0.2.0 → 0.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+
4
+ ## 0.2.1 (2026-11-27)
5
+
6
+ - No monogram join or link in a script face (tagged `script`): its capitals are joined strokes already, and JO in
7
+ Caveat joined into a p.
8
+
3
9
  ## 0.2.0 (2026-11-27)
4
10
 
5
11
  - **Short names** (`src/edits/short.js`, `isShort`, `SHORT_EDITS`): nine moves for names of one to three letters, which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logomarks/typemarks",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Wordmarks from any font, no AI: a name set in a font and cut by design rules (a crossbar dropped, a shared stroke, a stencil break, one slice across the word, a bar extended, a letter swapped…), each edit found from the font's own outlines, ranked into a page of diverse results. Runs in the browser and in Node; reads TTF, OTF and WOFF (TrueType or CFF outlines) with opentype.js.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -22,6 +22,8 @@ import { roomBetween, bolder, counterOf } from '../ops.js';
22
22
  const inked = (word) => word.letters.filter((l) => l.shape.length);
23
23
  /** A name of one to three letters, one word. */
24
24
  export const isShort = (word) => { const n = inked(word).length; return n >= 1 && n <= 3 && !word.letters.some((l) => /\s/.test(l.char)); };
25
+ /** A script face (tagged `script`): its capitals are joined strokes already, so a join or link turns JO into a p. */
26
+ const script = (word) => !!word.font?.tags?.includes('script');
25
27
  const stemOf = (word) => word.stem || strokeOf(word);
26
28
 
27
29
  const STRAIGHT = 'IiLlTtJj1|';
@@ -75,7 +77,7 @@ export const monoJoin = {
75
77
  { key: 'share', label: 'Share', type: 'choice', options: ['stroke', 'more'], value: 'stroke' },
76
78
  { key: 'pair', label: 'Pair', type: 'choice', options: ['first', 'last'], value: 'first' },
77
79
  ],
78
- find: (word) => (isShort(word) ? pairsOf(word).filter((pr) => joinable(word, pr)).map(([i]) => i) : []),
80
+ find: (word) => (isShort(word) && !script(word) ? pairsOf(word).filter((pr) => joinable(word, pr)).map(([i]) => i) : []),
79
81
  apply(word, p) {
80
82
  const prs = pairsOf(word).filter((pr) => joinable(word, pr));
81
83
  if (!prs.length) return false;
@@ -301,7 +303,7 @@ export const link = {
301
303
  { key: 'gap', label: 'Gap', type: 'range', min: 0.3, max: 0.6, step: 0.02, value: 0.4 },
302
304
  { key: 'front', label: 'In front', type: 'choice', options: ['alternate', 'right', 'left'], value: 'alternate' },
303
305
  ],
304
- find: (word) => (isShort(word) ? pairsOf(word).filter((pr) => linkable(word, pr)).map(([i]) => i) : []),
306
+ find: (word) => (isShort(word) && !script(word) ? pairsOf(word).filter((pr) => linkable(word, pr)).map(([i]) => i) : []),
305
307
  apply(word, p) {
306
308
  const prs = pairsOf(word).filter((pr) => linkable(word, pr));
307
309
  if (!prs.length) return false;