@logomarks/brand-kit 0.7.1 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to `@logomarks/brand-kit` are documented here.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.8.0] — 2026-11-26
9
+
10
+ ### Added
11
+
12
+ - `wordmark` on a brand: the name already drawn (`{ d, box, cap, fillRule?, font?, license?, note? }`, its baseline on
13
+ y = 0), used in every lockup in place of the name set in the brand's face, at the same cap height and clear space.
14
+ For wordmarks whose letters were changed by rule or by hand (Typemarks on the Logomarks site). The sheet, the deck and
15
+ the social images show it wherever they show a lockup; `brand.json` records `logo.name: { drawn: true, … }`, the
16
+ README and the deck's type slide say so. The brand's face still sets the words round the logo. `wordmarkSet()` gives
17
+ the set line for `lockup()`. Without it, every file is byte-identical to 0.7.1.
18
+
8
19
  ## [0.7.1] — 2026-11-15
9
20
 
10
21
  ### Changed
package/README.md CHANGED
@@ -32,7 +32,7 @@ for (const [file, data] of files) {
32
32
 
33
33
  ## What's in it
34
34
 
35
- - [API](https://github.com/Logomarks/brand-kit/blob/main/docs/api.md): the mark on light, dark and colour, favicons and a real `.ico`, outlined lockups (tracking, capitals and an optional tagline line), a 50–950 OKLCH palette with WCAG pairings, CSS and design tokens, `brand.json`, the brand sheet, and every part on its own
35
+ - [API](https://github.com/Logomarks/brand-kit/blob/main/docs/api.md): the mark on light, dark and colour, favicons and a real `.ico`, outlined lockups (tracking, capitals, an optional tagline line, or a wordmark you have drawn), a 50–950 OKLCH palette with WCAG pairings, CSS and design tokens, `brand.json`, the brand sheet, and every part on its own
36
36
  - [Platforms](https://github.com/Logomarks/brand-kit/blob/main/docs/platforms.md): the social pack's sizes and safe zones, with sources
37
37
  - [Seal, textures, finishes, swatches and the deck](https://github.com/Logomarks/brand-kit/blob/main/docs/identity.md): the round seal lockup, texture-collaged marks, letterpress, riso and stamp finishes, named swatch cards and the nine-slide guidelines deck with its PDF
38
38
  - [Styles and motion](https://github.com/Logomarks/brand-kit/blob/main/docs/styles.md): `minimal`, `bold`, `pattern` and `gradient`, and the animated SVGs
package/docs/api.md CHANGED
@@ -17,6 +17,7 @@ Everything is exported from `@logomarks/brand-kit`. A function that takes a bran
17
17
  | `tracking` | the font's | The name's letter-spacing in em/1000 (100 = 0.1 em), added between glyphs on top of kerning. |
18
18
  | `caps` | the font's `case` | `true` sets the name in capitals. |
19
19
  | `lockupTagline` | off | Puts the tagline under the name in every lockup: `true`, or `{ font, tracking, caps }` (default the brand's face, tracking 80, as typed). See [Type in the lockups](#type-in-the-lockups). |
20
+ | `wordmark` | none | The name already drawn, used in every lockup in place of `name` set in `font`: `{ d, box, cap, fillRule?, font?, license?, note? }`. See [A drawn wordmark](#a-drawn-wordmark). |
20
21
 
21
22
  ## `brandKit(options)`
22
23
 
@@ -132,6 +133,33 @@ brand.lockup('stacked', { markColor: '#111', textColor: '#111', taglineColor: '#
132
133
  - **Everywhere else:** the clear space, the brand sheet, the guidelines deck (the typography slide lists the name's tracking and case and the tagline's type) and the social images use the same lockups; a social image whose lockup carries the tagline doesn't repeat it underneath. `brand.json` records `logo.name` and `logo.tagline`.
133
134
  - Without `lockupTagline` (the default), lockups are byte-identical to 0.4.
134
135
 
136
+ ### A drawn wordmark
137
+
138
+ When the name's letters were changed (a crossbar dropped, a bar run over the word: a wordmark no face would set), hand
139
+ the drawing in and every lockup uses it:
140
+
141
+ ```js
142
+ await brandKit({
143
+ svg, name: 'Lucia', color: '#0f766e',
144
+ wordmark: {
145
+ d: 'M0 -400H100V0H0Z …', // one path, its baseline on y = 0 (y runs down)
146
+ box: [0, -400, 1480, 0], // its ink: [x0, y0, x1, y1] or { x, y, w, h }
147
+ cap: 400, // the capitals' height, which the lockups size the name by
148
+ font: 'Jost', license: 'OFL-1.1', note: 'Made with Typemarks.',
149
+ },
150
+ });
151
+ ```
152
+
153
+ - It is the name in the horizontal and stacked lockups on every ground, and so wherever the kit shows a lockup: the
154
+ brand sheet, the deck and the social images. It sits exactly where a set name would: its cap height the layout's
155
+ share of the mark, the same clear space.
156
+ - `name` is still the brand in words (file names, `brand.json`, the README) and `font` still sets the words round the
157
+ logo: the sheet's and deck's headings, the seal's ring, the social headlines. `tracking` and `caps` do nothing.
158
+ - `brand.json` records it as `logo.name: { drawn: true, font, license, note }`, and the README says to use the lockup
159
+ files rather than type the name.
160
+ - `wordmarkSet(wordmark, text)` gives the set line on its own, for `lockup()`.
161
+ - Without `wordmark`, everything is byte-identical to 0.7.
162
+
135
163
  ## Rendering
136
164
 
137
165
  PNGs come from a host's `rasterize(svg, { width, height })` when one is given (the `logomarks` CLI passes resvg-wasm). Otherwise they come from sharp in Node, or a canvas in a browser through `@logomarks/image-effects/raster`. SVGs need neither.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logomarks/brand-kit",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "A complete brand kit from a logomark, a name, a colour and a typeface: the mark on light, dark and colour, favicons and a real .ico, outlined lockups and a round seal, a 50-950 OKLCH palette with WCAG pairings and named swatch cards, CSS and design tokens, brand.json, a brand sheet and a guidelines deck (PNG, SVG and PDF). Plus texture-collaged and letterpress, riso or stamp-printed marks, and a social pack at every platform's current sizes in four styles, with animated SVGs and seal avatars.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -89,5 +89,8 @@
89
89
  "@types/node": "^26.6.5",
90
90
  "sharp": "^0.35.5",
91
91
  "typescript": "^6.0.3"
92
+ },
93
+ "overrides": {
94
+ "fflate": "0.7.5"
92
95
  }
93
96
  }
@@ -29,6 +29,29 @@ export interface BrandInput {
29
29
  handle?: string;
30
30
  /** Where the mark came from, for `brand.json` (a mark from a library, its page and licence). */
31
31
  source?: MarkSource;
32
+ /**
33
+ * The name already drawn, used in every lockup in place of `name` set in `font` (`tracking` and `caps` then do
34
+ * nothing). `name` is still the brand's name in words, and `font` still sets the words round the logo.
35
+ */
36
+ wordmark?: Wordmark;
37
+ }
38
+
39
+ /** A name drawn as one path: letters changed by hand or by rule, which no face would set. */
40
+ export interface Wordmark {
41
+ /** The path data, its baseline on y = 0 (y runs down, so the capitals' tops are negative). */
42
+ d: string;
43
+ /** Its ink box in the same units: `{ x, y, w, h }` or `[x0, y0, x1, y1]`. */
44
+ box: { x: number; y: number; w: number; h: number } | [number, number, number, number];
45
+ /** The capitals' height in the same units: what the lockups size the name by. */
46
+ cap: number;
47
+ /** The path's fill rule. Default `'evenodd'`. */
48
+ fillRule?: 'evenodd' | 'nonzero';
49
+ /** The face its letters came from, for `brand.json` and the README. */
50
+ font?: string;
51
+ /** That face's licence. */
52
+ license?: string;
53
+ /** A line about how it was drawn. */
54
+ note?: string;
32
55
  }
33
56
 
34
57
  /** How the tagline is set in the lockups. */
@@ -78,6 +101,8 @@ export interface Brand {
78
101
  handle: string;
79
102
  /** Where the mark came from, when given. */
80
103
  source?: MarkSource;
104
+ /** Set when the name is a drawn wordmark: the face its letters came from, that face's licence and a note. */
105
+ wordmark?: Pick<Wordmark, 'font' | 'license' | 'note'>;
81
106
  mark: Mark;
82
107
  palette: Palette;
83
108
  font: ResolvedFont;
@@ -102,6 +127,8 @@ export function grounds(palette: Palette): Grounds;
102
127
  export const TAGLINE_TYPE: Readonly<{ tracking: 80; caps: false }>;
103
128
  /** The tagline's type, filled in (`true` for the defaults in the brand's face). */
104
129
  export function taglineType(o: true | TaglineType, face: ResolvedFont): ResolvedTaglineType;
130
+ /** A drawn wordmark as a set line (baseline on y = 0), for `lockup()`. */
131
+ export function wordmarkSet(wordmark: Wordmark, text: string): TypeSet;
105
132
  /** A brand from its inputs (a resolved brand passes through). */
106
133
  export function resolveBrand(input: BrandInput | Brand): Promise<Brand>;
107
134
  /** What the mark's own files need: the name as given, the mark and the palette (no type set, no font loaded). */
@@ -43,6 +43,23 @@ export function taglineType(o, face) {
43
43
  return { font: t.font ? resolveFont(t.font) : face, tracking: t.tracking ?? TAGLINE_TYPE.tracking, caps: t.caps ?? TAGLINE_TYPE.caps };
44
44
  }
45
45
 
46
+ /**
47
+ * A name already drawn (a wordmark whose letters were changed by hand or by rule) as a set line, so the lockups place
48
+ * it exactly as they place a name set in a face: its baseline on y = 0, sized by its cap height.
49
+ *
50
+ * @param {import('./brand.js').Wordmark} w - The path, its ink box and the cap height, in the wordmark's own units.
51
+ * @param {string} text - The name it spells.
52
+ * @returns {import('./type.js').TypeSet} The line.
53
+ * @throws {TypeError} When the path, the box or the cap height is missing or empty.
54
+ */
55
+ export function wordmarkSet(w, text) {
56
+ const b = Array.isArray(w.box) ? { x: w.box[0], y: w.box[1], w: w.box[2] - w.box[0], h: w.box[3] - w.box[1] } : w.box;
57
+ if (!w.d?.trim() || !b || !(b.w > 0) || !(b.h > 0) || !(w.cap > 0)) throw new TypeError('brand-kit: `wordmark` needs `d`, a `box` with size and a `cap` height');
58
+ if (!/^[\sMmLlHhVvCcSsQqTtAaZz0-9.,eE+-]+$/.test(w.d)) throw new TypeError('brand-kit: `wordmark.d` must be SVG path data');
59
+ const rule = w.fillRule === 'nonzero' ? 'nonzero' : 'evenodd';
60
+ return { paths: `<path fill-rule="${rule}" d="${w.d.trim()}"/>`, box: { x: b.x, y: b.y, w: b.w, h: b.h }, cap: w.cap, text, tracking: 0, missing: [] };
61
+ }
62
+
46
63
  /**
47
64
  * A brand, resolved.
48
65
  *
@@ -52,11 +69,12 @@ export function taglineType(o, face) {
52
69
  */
53
70
  export async function resolveBrand(input) {
54
71
  if (isBrand(input)) return input;
55
- const { svg, name, color = DEFAULT_COLOR, font, tagline = '', url = '', handle, source, tracking, caps, lockupTagline } = input;
72
+ const { svg, name, color = DEFAULT_COLOR, font, tagline = '', url = '', handle, source, tracking, caps, lockupTagline, wordmark } = input;
56
73
  if (!svg) throw new TypeError('brand-kit: `svg` (the mark) is required');
57
74
  if (!name?.trim()) throw new TypeError('brand-kit: `name` is required');
58
75
  const face = resolveFont(font);
59
- const set = await typeset(name.trim(), face, { tracking, caps });
76
+ // A drawn wordmark is the name in every lockup; the face still sets the words round it (the sheet, the deck, the seal).
77
+ const set = wordmark ? wordmarkSet(wordmark, name.trim()) : await typeset(name.trim(), face, { tracking, caps });
60
78
  // The tagline is set in the brand's face on the sheet, deck, seal and social images: drop what the face can't draw.
61
79
  const lacks = tagline.trim() ? await missingGlyphs(tagline.trim(), face) : [];
62
80
  const line = lacks.length ? withoutChars(tagline.trim(), lacks) : tagline;
@@ -67,8 +85,9 @@ export async function resolveBrand(input) {
67
85
  const slug = slugify(name);
68
86
  return {
69
87
  name: name.trim(), slug, tagline: line, url, handle: handle ?? `@${slug.replace(/-/g, '')}`, ...(source && { source }),
88
+ ...(wordmark && { wordmark: { ...(wordmark.font && { font: wordmark.font }), ...(wordmark.license && { license: wordmark.license }), ...(wordmark.note && { note: wordmark.note }) } }),
70
89
  mark, palette, font: face, nameSet: set, grounds: grounds(palette),
71
- nameType: { tracking: set.tracking, caps: caps ?? face.case === 'uppercase' }, taglineType: tt, taglineSet: tagSet,
90
+ nameType: wordmark ? { tracking: 0, caps: false } : { tracking: set.tracking, caps: caps ?? face.case === 'uppercase' }, taglineType: tt, taglineSet: tagSet,
72
91
  lockup: (layout, { tagline: withTagline = true, ...colors }) => makeLockup({ mark, name: set, tagline: withTagline ? tagSet : null, layout, ...colors }),
73
92
  };
74
93
  }
@@ -27,6 +27,7 @@ export const type = {
27
27
  page.text(M, 912, '0123456789 &@?!%€£$', set);
28
28
  const sx = 1260;
29
29
  const rows = [['Weight', String(f.weight)], ['Tracking', `${nt.tracking} (em/1000)`], ['Case', nt.caps ? 'Capitals' : f.case === 'none' ? 'As written' : f.case], ['Licence', f.license]];
30
+ if (brand.wordmark) rows.unshift(['Logo name', `Drawn wordmark${brand.wordmark.font ? `, from ${brand.wordmark.font}` : ''}`]);
30
31
  if (tt && brand.taglineSet?.box.w) rows.push(['Tagline', `${tt.font.name} ${tt.font.weight}, tracking ${tt.tracking}${tt.caps ? ', capitals' : ''}`]);
31
32
  rows.push(['Labels', 'Inter, tracked capitals']);
32
33
  for (const [i, [k, v]] of rows.entries()) {
package/src/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  export { brandKit } from './kit/index.js';
4
4
  export { socialPack, ANIMATED_KINDS } from './social/index.js';
5
- export { resolveBrand, resolveMarkBrand, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
5
+ export { resolveBrand, resolveMarkBrand, wordmarkSet, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
6
6
  export { loadMark, markBody, markSvg, markAutoSvg, markTile, tileSvg, padForCircle } from './brand/mark.js';
7
7
  export { resolveFont, DEFAULT_FONT } from './brand/font.js';
8
8
  export { typeset, hasGlyph, missingGlyphs, withoutChars } from './brand/type.js';
@@ -39,7 +39,7 @@ export { VERSION } from './version.js';
39
39
 
40
40
  export type { BrandKitOptions, BrandKit } from './kit/index.js';
41
41
  export type { SocialOptions, SocialPack } from './social/index.js';
42
- export type { BrandInput, Brand, Ground, Grounds, MarkSource, TaglineType, ResolvedTaglineType } from './brand/brand.js';
42
+ export type { BrandInput, Brand, Wordmark, Ground, Grounds, MarkSource, TaglineType, ResolvedTaglineType } from './brand/brand.js';
43
43
  export type { Mark, TileOptions } from './brand/mark.js';
44
44
  export type { BrandFont, ResolvedFont } from './brand/font.js';
45
45
  export type { TypeSet, TypesetOptions, Box } from './brand/type.js';
package/src/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  export { brandKit } from './kit/index.js';
9
9
  export { socialPack, ANIMATED_KINDS } from './social/index.js';
10
- export { resolveBrand, resolveMarkBrand, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
10
+ export { resolveBrand, resolveMarkBrand, wordmarkSet, grounds, taglineType, DEFAULT_COLOR, TAGLINE_TYPE } from './brand/brand.js';
11
11
  export { loadMark, markBody, markSvg, markAutoSvg, markTile, tileSvg, padForCircle } from './brand/mark.js';
12
12
  export { resolveFont, DEFAULT_FONT } from './brand/font.js';
13
13
  export { typeset, hasGlyph, missingGlyphs, withoutChars } from './brand/type.js';
@@ -21,7 +21,8 @@ export interface BrandJson {
21
21
  clearSpace: string;
22
22
  minimum: { screen: string; print: string; withName: string };
23
23
  /** How the name is set: tracking (em/1000) and capitals. */
24
- name: { tracking: number; caps: boolean };
24
+ /** How the name is set; for a drawn wordmark, `drawn` and where its letters came from. */
25
+ name: { tracking: number; caps: boolean } | { drawn: true; font?: string; license?: string; note?: string };
25
26
  /** The tagline in the lockups, when there is one: the text as set, and its type. */
26
27
  tagline?: { text: string; font: string; weight: number; tracking: number; caps: boolean };
27
28
  };
@@ -33,7 +33,7 @@ export function brandJson(brand, files) {
33
33
  layouts: ['horizontal', 'stacked', 'mark', 'seal'],
34
34
  clearSpace: `${LOCKUP.clear} × the mark's height on every side`,
35
35
  minimum: { screen: '16px', print: '8mm', withName: '24px' },
36
- name: { tracking: brand.nameType.tracking, caps: brand.nameType.caps },
36
+ name: brand.wordmark ? { drawn: true, ...brand.wordmark } : { tracking: brand.nameType.tracking, caps: brand.nameType.caps },
37
37
  ...(brand.taglineType && brand.taglineSet?.box.w && { tagline: { text: brand.taglineSet.text, font: brand.taglineType.font.name, weight: brand.taglineType.font.weight, tracking: brand.taglineType.tracking, caps: brand.taglineType.caps } }),
38
38
  },
39
39
  head: HEAD_HTML,
package/src/kit/readme.js CHANGED
@@ -28,7 +28,7 @@ ${social ? '| `social/` | Every platform image in three styles, the email signat
28
28
  Keep a quarter of the mark's height clear round the logo. Use it no smaller than 16 px on screen or 8 mm in print, and drop the name below 24 px.
29
29
 
30
30
  Colour: ${brand.palette.primary} (text on it: ${brand.palette.onPrimary}). Type: ${brand.font.name} ${brand.font.weight}, ${brand.font.url}
31
-
31
+ ${brand.wordmark ? `\nThe name in the logo is a drawn wordmark${brand.wordmark.font ? `, its letters from ${brand.wordmark.font}${brand.wordmark.license ? ` (${brand.wordmark.license})` : ''}` : ''}: use the lockup files for it, never the name typed in a font.${brand.wordmark.note ? ` ${brand.wordmark.note}` : ''}\n` : ''}
32
32
  Favicons: put \`favicon/\` at the site's root and add
33
33
 
34
34
  \`\`\`html