# @hanzi.pro/webfonts-genyo-gothic

**GenYo Gothic** — 傳承字形 (heritage-glyph) Traditional-Chinese webfont, sliced into `unicode-range` woff2 subsets from [ButTaiwan/genyog-font](https://github.com/ButTaiwan/genyog-font) `v2.100`.

## Usage

Drop these in your `<head>` — `preconnect` warms the CDN connection so the stylesheet (and the woff2 slices it pulls) arrive sooner:

```html
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hanzi.pro/webfonts-genyo-gothic@0.1.0/swap.css" />
```

Then use the family in CSS:

```css
body { font-family: "GenYo Gothic", sans-serif; }
```

The browser downloads only the slices your page actually uses; codepoints outside the subset fall through to the next font in your stack.

## font-display

`swap.css` is the default (`font-display: swap` — show text immediately, swap the glyph in when it arrives). Two alternates ship alongside it; just point the stylesheet at a different file:

```html
<!-- headlines / logotypes: never flash the wrong fallback glyph -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hanzi.pro/webfonts-genyo-gothic@0.1.0/block.css" />

<!-- Core-Web-Vitals pages: zero layout shift (may skip the first visit) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hanzi.pro/webfonts-genyo-gothic@0.1.0/optional.css" />
```

| file | `font-display` | use when |
| --- | --- | --- |
| `swap.css` | `swap` | body / content — show text now, swap glyph in (FOUT) |
| `block.css` | `block` | headlines / logotypes — brief invisible text, never the wrong glyph |
| `optional.css` | `optional` | perf-critical — no layout shift; slice may sit out the first visit |

### Single weight

`swap.css` (and `block.css` / `optional.css`) declares **every** weight; the browser still only downloads the slices and weights your page uses. But if you want a smaller stylesheet, each mode also ships one file per weight under a matching subfolder — `swap/<weight>.css`, `block/<weight>.css`, `optional/<weight>.css`:

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@hanzi.pro/webfonts-genyo-gothic@0.1.0/swap/400.css" />
```

Available weights: `250` `300` `350` `400` `500` `700` `900`

## License

SIL Open Font License 1.1 — see `LICENSE`. Font copyright remains with the upstream authors of ButTaiwan/genyog-font.
