feat(icons): rebrand app icon; slice the full set from one master
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 23s
CI / ui (pull_request) Successful in 1m13s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m54s
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 11s
CI / integration (pull_request) Successful in 23s
CI / ui (pull_request) Successful in 1m13s
CI / conformance (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m54s
The SVG tracer export failed, so the icon was designed collaboratively from
scratch: a wooden «Э» tile with a ✻ score-subscript in Spectral Bold, wood
grain and diagonal light/shadow. Construction is specified in fractions of the
side in docs/ICON_BRANDBOOK.md; the reference generator, pinned Spectral font
and committed masters live in assets/icons/brand/.
One master -> the whole set (assets/icons/brand/build-set.mjs + build-android-res.mjs):
- web (ui/public): favicon.svg (light+dark via prefers-color-scheme), favicon.ico,
apple-touch, PWA any + maskable (+ dark variants), og-image reskinned to
«Эрудит» / Игра в слова
- Capacitor layers: ui/assets/{icon,icon-foreground,icon-background}.png
- Android launcher res, all densities, NO inset, + monochrome themed layer
(anydpi xml: background+foreground+monochrome)
- manual-upload art: assets/icons/brand/{vk,tg,store} (square, no rounding)
Primary variant light; dark where the platform can theme (favicon.svg). The old
LiberationSans generator (assets/icons/build) is removed; docs/ICONS.md retargeted
onto the single master. ANDROID_PLAN icon-rebrand item marked done.
This commit is contained in:
+60
-81
@@ -1,111 +1,90 @@
|
||||
# Icon & logo asset map
|
||||
|
||||
> Single reference for every icon/logo format the project ships, and the
|
||||
> single-master workflow a rebrand should follow. Goal: one vector master →
|
||||
> regenerate every target, miss nothing. The iOS / iPadOS rows are **future**
|
||||
> (no iOS shell exists yet) but are listed so a rebrand covers them in one pass.
|
||||
> The whole shipped icon set is sliced from **one master**. This file is the per-platform
|
||||
> **target map** (which file goes where, at what size). How the mark itself is constructed
|
||||
> — proportions, palette, wood grain, the light/shadow gradients, the «Э» + ✻ placement,
|
||||
> all in fractions of the side — is specified in [`ICON_BRANDBOOK.md`](ICON_BRANDBOOK.md).
|
||||
> The reference generator, the pinned Spectral font and the committed masters live in
|
||||
> [`../assets/icons/brand/`](../assets/icons/brand/).
|
||||
|
||||
## Current state — three drifting sources
|
||||
## The master (one source, six layers)
|
||||
|
||||
The «Э» mark is emitted today by three independent pipelines that visually drift
|
||||
(the favicon is a rounded bordered tile, the maskable is a full-bleed square, the
|
||||
Android launcher is an upscale). The rebrand collapses them onto one master.
|
||||
`brand/build-icon.mjs` emits any `--variant light|dark` in any `--layer`:
|
||||
|
||||
1. **Web favicon set** — `assets/icons/build/generate.js` composes SVG from font
|
||||
glyph outlines (`assets/icons/build/glyphs.json`) and rasterises with the `ui`
|
||||
package's Playwright chromium →
|
||||
`ui/public/{favicon.svg, favicon.ico, apple-touch-icon.png, og-image.png}`.
|
||||
2. **PWA icons** — `ui/public/{icon-192, icon-512, icon-maskable-512}.png` are
|
||||
hand-placed and covered by **no** generator (the main drift source).
|
||||
3. **Android** — `capacitor-assets generate --android` (`pnpm android:assets`)
|
||||
expands `ui/assets/icon.png` into the launcher + splash matrix under
|
||||
`ui/android/app/src/main/res/`.
|
||||
| Layer | What | Feeds |
|
||||
|---|---|---|
|
||||
| `full` | rounded tile + master mark | `favicon.svg` |
|
||||
| `flat` | square tile + master mark (OS rounds) | apple-touch, PWA "any", VK, TG, store |
|
||||
| `background` | square tile only, full-bleed | Android adaptive background |
|
||||
| `foreground` | mark only, transparent, re-placed for the round mask | Android adaptive foreground |
|
||||
| `maskable` | square tile + foreground-placed mark | PWA `maskable` |
|
||||
| `monochrome` | foreground-placed silhouette, flat colour | Android 13+ themed layer |
|
||||
|
||||
## Source masters (author once; commit)
|
||||
`brand/build-set.mjs` renders every raster below; `brand/build-android-res.mjs` renders
|
||||
the Android launcher resources.
|
||||
|
||||
The minimum set the designer supplies so every target below regenerates:
|
||||
## Generated targets
|
||||
|
||||
| Master | Size | Format | Background | Need | Drives |
|
||||
|---|---|---|---|---|---|
|
||||
| Vector mark | — | SVG | transparent | required | `favicon.svg`; the canonical shape |
|
||||
| App icon | 1024×1024 | PNG | opaque | required | Android legacy, PWA raster, iOS, store icons |
|
||||
| Adaptive foreground | 1024×1024 | PNG | transparent | recommended | Android/iOS adaptive foreground — mark inside the ~66 % safe area (outer third is masked) |
|
||||
| Adaptive background | 1024×1024 | PNG | opaque | recommended | Android/iOS adaptive background layer |
|
||||
| Maskable | 512×512 | PNG | opaque | recommended | PWA `maskable` (mark inside the maskable safe zone) |
|
||||
| Splash | 2732×2732 (+ a `-dark` variant) | PNG | opaque | optional | Android/iOS splash / launch screen |
|
||||
| OG card | 1200×630 | PNG | opaque | optional | link-preview card (mark **plus** wordmark text) |
|
||||
|
||||
Capacitor reads the adaptive/splash masters from `ui/assets/`:
|
||||
`icon.png`, `icon-foreground.png`, `icon-background.png`, `splash.png`,
|
||||
`splash-dark.png`. Without the foreground/background pair it insets the single
|
||||
`icon.png` into the adaptive safe zone (today's poorer look).
|
||||
|
||||
## Generated targets (full coverage)
|
||||
|
||||
### Web — `ui/public/`, via `node assets/icons/build/generate.js`
|
||||
### Web — `ui/public/` (via `brand/build-set.mjs`)
|
||||
|
||||
| File | Size | Note |
|
||||
|---|---|---|
|
||||
| `favicon.svg` | vector | canonical vector output |
|
||||
| `favicon.svg` | vector | **light + dark in one file** via `prefers-color-scheme` |
|
||||
| `favicon.ico` | 32×32 | PNG-in-ICO; answers the blind `/favicon.ico` probe |
|
||||
| `apple-touch-icon.png` | 180×180 | opaque full-bleed; iOS Safari home-screen (iOS masks its own corners) |
|
||||
| `og-image.png` | 1200×630 | link-preview card; has the wordmark, referenced by absolute URL |
|
||||
| `apple-touch-icon.png` | 180×180 | opaque full-bleed (iOS masks its own corners) |
|
||||
| `icon-192.png` / `icon-512.png` | 192 / 512 | PWA `any`, light |
|
||||
| `icon-192-dark.png` / `icon-512-dark.png` | 192 / 512 | dark variants (generated; see PWA note) |
|
||||
| `icon-maskable-512.png` | 512×512 | PWA `maskable`, light |
|
||||
| `icon-maskable-512-dark.png` | 512×512 | dark variant (generated; see PWA note) |
|
||||
| `og-image.png` | 1200×630 | board-green card: master tile + «Эрудит» / Игра в слова |
|
||||
|
||||
### PWA — `ui/public/`, referenced by `manifest.webmanifest`
|
||||
### PWA — `ui/public/manifest.webmanifest`
|
||||
|
||||
| File | Size | `purpose` |
|
||||
|---|---|---|
|
||||
| `icon-192.png` | 192×192 | `any` |
|
||||
| `icon-512.png` | 512×512 | `any` |
|
||||
| `icon-maskable-512.png` | 512×512 | `maskable` |
|
||||
Referenced icons are the **light** set (`icon-192`, `icon-512` = `any`;
|
||||
`icon-maskable-512` = `maskable`). The manifest has **no reliable way to pick an icon by
|
||||
colour scheme**, so the dark PNGs are **generated but not referenced** — theming the
|
||||
in-browser tab is handled by `favicon.svg` instead. Wire the dark files in only if a
|
||||
concrete installer target is known to honour them.
|
||||
|
||||
### Android — `ui/android/app/src/main/res/`, via `pnpm android:assets`
|
||||
### Android — `ui/android/app/src/main/res/` (via `brand/build-android-res.mjs`)
|
||||
|
||||
Generated per density mdpi→xxxhdpi (exact px tool-managed); **do not hand-edit**:
|
||||
Capacitor layer inputs are `ui/assets/{icon,icon-foreground,icon-background}.png`. The
|
||||
resources are **hand-generated from the layers**, not `capacitor-assets` — our layers
|
||||
already fill the 108 dp canvas (foreground inside the 61 % safe zone, background
|
||||
full-bleed), so they must be placed with **no inset**, and we add the **monochrome**
|
||||
themed layer, neither of which `capacitor-assets` does. Per density mdpi→xxxhdpi (+ldpi):
|
||||
|
||||
- `mipmap-*/ic_launcher.png` — legacy square (48 / 72 / 96 / 144 / 192)
|
||||
- `mipmap-*/ic_launcher_round.png` — legacy round
|
||||
- `mipmap-*/ic_launcher.png` / `ic_launcher_round.png` — legacy square / round (composite)
|
||||
- `mipmap-*/ic_launcher_foreground.png` + `ic_launcher_background.png` — adaptive layers
|
||||
- `mipmap-anydpi-v26/ic_launcher.xml` + `ic_launcher_round.xml` — adaptive descriptors
|
||||
- `drawable*/splash.png` — splash (portrait/landscape × light/night × density)
|
||||
- `mipmap-*/ic_launcher_monochrome.png` — themed layer
|
||||
- `mipmap-anydpi-v26/ic_launcher.xml` + `ic_launcher_round.xml` — **no `<inset>`**, with
|
||||
`<background>` + `<foreground>` + `<monochrome>` (committed by hand)
|
||||
|
||||
### iOS / iPhone / iPad — FUTURE, via `capacitor-assets generate --ios`
|
||||
### iOS / iPhone / iPad — FUTURE
|
||||
|
||||
No iOS shell today; listed so the rebrand covers it. Same masters produce
|
||||
`App/App/Assets.xcassets/AppIcon.appiconset`:
|
||||
No iOS shell today. When one exists, `flat` (opaque, no alpha, no rounded corners; the OS
|
||||
masks) drives the asset catalog — a single 1024×1024 marketing icon (Xcode derives the
|
||||
rest), plus light/dark/tinted where the catalog supports it.
|
||||
|
||||
- Modern (Xcode 14+): a single **1024×1024** marketing icon; Xcode derives the rest.
|
||||
- Full asset-catalog px (if a full set is emitted): 20, 29, 40, 58, 60, 76, 80,
|
||||
87, 120, 152, 167, 180, 1024 — iPhone {40, 58, 60, 80, 87, 120, 180}, iPad
|
||||
{20, 29, 40, 76, 152, 167}, App Store marketing {1024}.
|
||||
- Splash: `splash-2732x2732.png` (+ dark) → the launch storyboard.
|
||||
- iOS icons are **opaque, no alpha, no rounded corners** (the OS applies the mask).
|
||||
### VK / Telegram / store — manual upload (`brand/{vk,tg,store}/`)
|
||||
|
||||
### Store-listing art — uploaded by hand (outside the repo)
|
||||
Square, **no rounding** (each platform crops/rounds itself), light `flat`:
|
||||
|
||||
| Store | Asset | Spec |
|
||||
| Folder | Files | Use |
|
||||
|---|---|---|
|
||||
| RuStore (now) | app icon | 512×512 PNG |
|
||||
| RuStore | screenshots | phone, per the RuStore listing spec |
|
||||
| RuStore | promo / feature graphic | per the RuStore listing spec |
|
||||
| App Store (future) | marketing icon | 1024×1024 |
|
||||
| App Store (future) | screenshots | per device class |
|
||||
| `vk/` | `vk-576/278/150/32.png` | VK community / app icons |
|
||||
| `tg/` | `tg-512.png` | Telegram bot avatar + Mini App icon (512, square; TG crops circular) |
|
||||
| `tg/` | `tg-demo-640x360.png` | BotFather `/newapp` demo banner (tile + wordmark) |
|
||||
| `store/` | `rustore-512.png` | RuStore app icon |
|
||||
| RuStore | screenshots / feature graphic | per the RuStore listing spec (uploaded by hand) |
|
||||
| Google Play (future) | icon / feature graphic | 512×512 / 1024×500 |
|
||||
| App Store (future) | marketing icon / screenshots | 1024×1024 / per device class |
|
||||
|
||||
## Regenerate
|
||||
|
||||
```sh
|
||||
cd assets/icons && node build/generate.js # web favicon set + og card -> ui/public/
|
||||
cd ui && pnpm android:assets # Android launcher + splash
|
||||
cd ui && node_modules/.bin/capacitor-assets generate --ios # future, once the iOS shell exists
|
||||
cd assets/icons/brand
|
||||
npm i # opentype.js (rasterisation reuses the ui package's chromium)
|
||||
node build-set.mjs # web (ui/public) + Capacitor layers (ui/assets) + vk/ tg/ store/ + og
|
||||
node build-android-res.mjs # Android launcher resources (all densities + monochrome)
|
||||
```
|
||||
|
||||
## Open items for the rebrand
|
||||
|
||||
- Decide how the new vector master feeds `assets/icons/` — retarget the generator
|
||||
onto the supplied vector, or drop in the output files and keep the generator for
|
||||
the OG card only.
|
||||
- Bring `icon-192 / icon-512 / icon-maskable-512` under a generator (today
|
||||
hand-placed — the main drift source).
|
||||
- Add `ui/assets/icon-foreground.png` + `icon-background.png` for a proper adaptive
|
||||
icon (today a single inset `icon.png`).
|
||||
|
||||
Reference in New Issue
Block a user