Font Management
Manage typography assets. 11 seed typefaces are hosted at GitHub
YaoApp/design-assets and downloaded on demand. Additional fonts can be
installed via Google Fonts.
Seed Typefaces (11 total)
English (7)
| Font |
Category |
Weights |
Use |
| Inter |
sans-serif |
400-800 (variable) |
Default body |
| Roboto |
sans-serif |
400, 500, 700 |
Material Design default |
| Open Sans |
sans-serif |
400, 600, 700 |
High readability body |
| Playfair Display |
serif |
400, 700, 900 |
Headings, posters, luxury |
| DM Sans |
sans-serif |
400, 500, 700 |
Modern geometric headings |
| Space Grotesk |
sans-serif |
400, 500, 700 |
Tech/creative headings |
| JetBrains Mono |
monospace |
400, 500, 700 |
Code, data tables |
Chinese (3)
| Font |
Category |
Weights |
Use |
| Noto Sans SC |
sans-serif |
400, 500, 700 |
Default Chinese body |
| Noto Serif SC |
serif |
400, 700 |
Chinese serif headings |
| LXGW WenKai |
handwritten |
400, 500 |
Chinese handwriting style |
Icon (1)
| Font |
Category |
Use |
| Material Symbols Rounded |
icon |
2500+ vector icons, variable |
Listing Available Fonts
Parse the font table from INDEX.md and check local cache:
cat $WORKDIR/design-works/.cache/assets/INDEX.md
For each font, check if cached:
ls $WORKDIR/design-works/.cache/assets/fonts/{family}/{file} 2>/dev/null \
&& echo "cached" || echo "not cached"
Display as a table with status: ✅ cached or ☁️ on-demand.
Font Recommendations
| Project Type |
Heading |
Body |
Chinese |
| Enterprise dashboard |
Inter 600-700 |
Inter 400 |
Noto Sans SC |
| Brand site |
Space Grotesk 700 |
Inter 400 |
Noto Sans SC |
| Blog / content |
Playfair Display 700 |
Open Sans 400 |
Noto Serif SC |
| Tech dark mode |
Space Grotesk 500 |
Inter 400 |
Noto Sans SC |
| E-commerce |
DM Sans 700 |
Inter 400 |
Noto Sans SC |
| App (general) |
Roboto 500 |
Roboto 400 |
Noto Sans SC |
| App (social) |
DM Sans 500 |
Inter 400 |
Noto Sans SC |
| Poster (formal) |
Playfair Display 900 |
— |
Noto Serif SC |
| Poster (creative) |
Space Grotesk 700 |
— |
LXGW WenKai |
Installing Fonts
From GitHub Registry (seed fonts)
FAMILY="Inter"
FONT_FILE="fonts/inter/Inter-Variable.woff2"
RAW_BASE="https://raw.githubusercontent.com/YaoApp/design-assets/main"
CACHE="$WORKDIR/design-works/.cache/assets/$FONT_FILE"
if [ ! -f "$CACHE" ]; then
echo "Downloading $FAMILY..."
mkdir -p "$(dirname "$CACHE")"
curl -# "$RAW_BASE/$FONT_FILE" -o "$CACHE"
echo "$FAMILY downloaded"
fi
# Copy to fonts/ and register with preview server
TARGET_DIR="$WORKDIR/design-works/fonts/$(echo "$FAMILY" | tr 'A-Z ' 'a-z-')"
mkdir -p "$TARGET_DIR"
cp "$CACHE" "$TARGET_DIR/"
curl -s -X POST http://localhost:3000/api/fonts/install \
-H "Content-Type: application/json" \
-d '{"family": "Inter", "weights": [400, 500, 600, 700, 800]}'
From Google Fonts (non-seed fonts)
curl -X POST http://localhost:3000/api/fonts/install \
-H "Content-Type: application/json" \
-d '{"family": "Montserrat", "weights": [400, 600, 700]}'
Extracting Fonts from Reference
When user provides a reference URL:
web_fetch the page
- Extract CSS
font-family declarations
- Match against INDEX.md seed fonts first (prefer managed fonts)
- For unmatched fonts, recommend from Google Fonts
- Present recommendation for user confirmation before installing
Chinese/English Font Pairing
| Pairing |
EN Heading |
EN Body |
ZH Heading |
ZH Body |
Use |
| Classic Enterprise |
Inter 700 |
Inter 400 |
Noto Sans SC 700 |
Noto Sans SC 400 |
SaaS, dashboard |
| Modern Brand |
Space Grotesk 700 |
Inter 400 |
Noto Sans SC 700 |
Noto Sans SC 400 |
Brand site |
| Magazine |
Playfair Display 900 |
Open Sans 400 |
Noto Serif SC 700 |
Noto Sans SC 400 |
Blog, content |
| Tech Dark |
Space Grotesk 500 |
Inter 400 |
Noto Sans SC 500 |
Noto Sans SC 400 |
Dev tools |
| E-commerce |
DM Sans 700 |
Inter 400 |
Noto Sans SC 700 |
Noto Sans SC 400 |
Promo landing |
| Warm Handcrafted |
DM Sans 500 |
Inter 400 |
LXGW WenKai 500 |
Noto Sans SC 400 |
Food, crafts |
| Data Dashboard |
Roboto 500 |
Roboto 400 |
Noto Sans SC 500 |
Noto Sans SC 400 |
Finance |
| App UI |
Roboto 500 |
Roboto 400 |
Noto Sans SC 500 |
Noto Sans SC 400 |
Mobile |
Rules
- Prefer seed fonts — 11 typefaces cover 95% of scenarios
- Download fonts on first use; show user visible download progress
- Only install additional fonts when user explicitly requests a special typeface
- Seed fonts are protected — deletion must check target is NOT one of the 11
- Chinese fonts are large (Noto Sans SC ~8MB per weight); warn before downloading
- Variable fonts (Inter, Material Symbols) preferred to reduce file count
- INDEX.md version changes auto-override cached font files
- User-installed non-seed fonts cached to
.cache/assets/fonts/ user subdirectory
1---2name: font-management3description: Font management — list, install, remove, and recommend fonts from 11 seed typefaces + Google Fonts4---56# Font Management78Manage typography assets. 11 seed typefaces are hosted at GitHub9`YaoApp/design-assets` and downloaded on demand. Additional fonts can be10installed via Google Fonts.1112## Seed Typefaces (11 total)1314### English (7)1516| Font | Category | Weights | Use |17|------|----------|---------|-----|18| Inter | sans-serif | 400-800 (variable) | Default body |19| Roboto | sans-serif | 400, 500, 700 | Material Design default |20| Open Sans | sans-serif | 400, 600, 700 | High readability body |21| Playfair Display | serif | 400, 700, 900 | Headings, posters, luxury |22| DM Sans | sans-serif | 400, 500, 700 | Modern geometric headings |23| Space Grotesk | sans-serif | 400, 500, 700 | Tech/creative headings |24| JetBrains Mono | monospace | 400, 500, 700 | Code, data tables |2526### Chinese (3)2728| Font | Category | Weights | Use |29|------|----------|---------|-----|30| Noto Sans SC | sans-serif | 400, 500, 700 | Default Chinese body |31| Noto Serif SC | serif | 400, 700 | Chinese serif headings |32| LXGW WenKai | handwritten | 400, 500 | Chinese handwriting style |3334### Icon (1)3536| Font | Category | Use |37|------|----------|-----|38| Material Symbols Rounded | icon | 2500+ vector icons, variable |3940## Listing Available Fonts4142Parse the font table from INDEX.md and check local cache:4344```bash45cat $WORKDIR/design-works/.cache/assets/INDEX.md46```4748For each font, check if cached:4950```bash51ls $WORKDIR/design-works/.cache/assets/fonts/{family}/{file} 2>/dev/null \52 && echo "cached" || echo "not cached"53```5455Display as a table with status: ✅ cached or ☁️ on-demand.5657## Font Recommendations5859| Project Type | Heading | Body | Chinese |60|-------------|---------|------|---------|61| Enterprise dashboard | Inter 600-700 | Inter 400 | Noto Sans SC |62| Brand site | Space Grotesk 700 | Inter 400 | Noto Sans SC |63| Blog / content | Playfair Display 700 | Open Sans 400 | Noto Serif SC |64| Tech dark mode | Space Grotesk 500 | Inter 400 | Noto Sans SC |65| E-commerce | DM Sans 700 | Inter 400 | Noto Sans SC |66| App (general) | Roboto 500 | Roboto 400 | Noto Sans SC |67| App (social) | DM Sans 500 | Inter 400 | Noto Sans SC |68| Poster (formal) | Playfair Display 900 | — | Noto Serif SC |69| Poster (creative) | Space Grotesk 700 | — | LXGW WenKai |7071## Installing Fonts7273### From GitHub Registry (seed fonts)7475```bash76FAMILY="Inter"77FONT_FILE="fonts/inter/Inter-Variable.woff2"78RAW_BASE="https://raw.githubusercontent.com/YaoApp/design-assets/main"79CACHE="$WORKDIR/design-works/.cache/assets/$FONT_FILE"8081if [ ! -f "$CACHE" ]; then82 echo "Downloading $FAMILY..."83 mkdir -p "$(dirname "$CACHE")"84 curl -# "$RAW_BASE/$FONT_FILE" -o "$CACHE"85 echo "$FAMILY downloaded"86fi8788# Copy to fonts/ and register with preview server89TARGET_DIR="$WORKDIR/design-works/fonts/$(echo "$FAMILY" | tr 'A-Z ' 'a-z-')"90mkdir -p "$TARGET_DIR"91cp "$CACHE" "$TARGET_DIR/"92curl -s -X POST http://localhost:3000/api/fonts/install \93 -H "Content-Type: application/json" \94 -d '{"family": "Inter", "weights": [400, 500, 600, 700, 800]}'95```9697### From Google Fonts (non-seed fonts)9899```bash100curl -X POST http://localhost:3000/api/fonts/install \101 -H "Content-Type: application/json" \102 -d '{"family": "Montserrat", "weights": [400, 600, 700]}'103```104105## Extracting Fonts from Reference106107When user provides a reference URL:1081. `web_fetch` the page1092. Extract CSS `font-family` declarations1103. Match against INDEX.md seed fonts first (prefer managed fonts)1114. For unmatched fonts, recommend from Google Fonts1125. Present recommendation for user confirmation before installing113114## Chinese/English Font Pairing115116| Pairing | EN Heading | EN Body | ZH Heading | ZH Body | Use |117|---------|-----------|---------|------------|---------|-----|118| Classic Enterprise | Inter 700 | Inter 400 | Noto Sans SC 700 | Noto Sans SC 400 | SaaS, dashboard |119| Modern Brand | Space Grotesk 700 | Inter 400 | Noto Sans SC 700 | Noto Sans SC 400 | Brand site |120| Magazine | Playfair Display 900 | Open Sans 400 | Noto Serif SC 700 | Noto Sans SC 400 | Blog, content |121| Tech Dark | Space Grotesk 500 | Inter 400 | Noto Sans SC 500 | Noto Sans SC 400 | Dev tools |122| E-commerce | DM Sans 700 | Inter 400 | Noto Sans SC 700 | Noto Sans SC 400 | Promo landing |123| Warm Handcrafted | DM Sans 500 | Inter 400 | LXGW WenKai 500 | Noto Sans SC 400 | Food, crafts |124| Data Dashboard | Roboto 500 | Roboto 400 | Noto Sans SC 500 | Noto Sans SC 400 | Finance |125| App UI | Roboto 500 | Roboto 400 | Noto Sans SC 500 | Noto Sans SC 400 | Mobile |126127## Rules128129- Prefer seed fonts — 11 typefaces cover 95% of scenarios130- Download fonts on first use; show user visible download progress131- Only install additional fonts when user explicitly requests a special typeface132- Seed fonts are protected — deletion must check target is NOT one of the 11133- Chinese fonts are large (Noto Sans SC ~8MB per weight); warn before downloading134- Variable fonts (Inter, Material Symbols) preferred to reduce file count135- INDEX.md version changes auto-override cached font files136- User-installed non-seed fonts cached to `.cache/assets/fonts/` user subdirectory