# TeXise browser font deployment

TeXise's licensed/product browser fonts are intentionally kept outside the redistributable source ZIP. The production installer loads them from an administrator-owned directory **after** the browser build, so rebuilding `dist/` cannot erase them.

## Authoritative production source directory

Default:

```text
/var/www/texise.com/fonts/
```

Override only when needed:

```ini
TEXISE_FONT_SOURCE_DIR=/var/www/texise.com/fonts
```

The current authoritative source set is exactly:

```text
Inter-Variable.woff2
JetBrainsMono-Variable.woff2
moranga-light.otf
Moranga-Regular.otf
moranga-regular-italic.otf
moranga-bold.otf
STIXTwoText-VariableFont.ttf
STIXTwoText-Italic-Variable.ttf
```

## Canonical deployed names

`install.sh` / `upgrade.sh` validates the external source files, then deploys them after the frontend build as:

```text
dist/texise-fonts/Inter-Variable.woff2
dist/texise-fonts/JetBrainsMono-Variable.woff2
dist/texise-fonts/Moranga-Light.otf
dist/texise-fonts/Moranga-Regular.otf
dist/texise-fonts/Moranga-RegularItalic.otf
dist/texise-fonts/Moranga-Bold.otf
dist/texise-fonts/STIXTwoText-VariableFont.ttf
dist/texise-fonts/STIXTwoText-Italic-Variable.ttf
```

The installer accepts the historical Moranga/STIX names only as upgrade fallbacks. New deployments should use the authoritative names above.

## Validation

The source, copied destination and Apache-served response must have the expected signature:

```text
Inter / JetBrains WOFF2       wOF2
Moranga OTF                   OTTO
STIX TTF                      00 01 00 00
```

Missing, empty, truncated, HTML/SPA-fallback or wrong-format files fail deployment. HTTP `200` by itself is not considered a valid font health check.

## Do not copy fonts into `dist` before installing

Do **not** do this:

```bash
cp -r ./fonts/* ./public_html/dist/texise-fonts/
./public_html/scripts/install.sh
```

The browser build replaces `dist/` and would delete that pre-copy. A production wrapper should simply run the installer:

```bash
#!/bin/bash
set -euo pipefail
chmod +x ./public_html/scripts/install.sh
./public_html/scripts/install.sh
```

## Typography boundary

```text
Public/application UI     Inter Variable
Display headings          Moranga Light / Regular / Regular Italic / Bold
LaTeX source              JetBrains Mono Variable
Terminal content          JetBrains Mono Variable
Visual manuscript         STIX Two Text Variable / Italic Variable
```

STIX is scoped only to the actual Visual Editor manuscript root. It must never become the font for website/application chrome, projects, templates, settings, admin, buttons, menus, AI, Paper Memory, terminal chrome, file tree, source editor or PDF controls.

Moranga is an expressive display face, not a normal control/body font. Inter is the normal UI/body face. JetBrains Mono is the source/terminal/code face.

The source tree may contain TeX/BusyTeX font data used by the browser TeX distribution. Those compiler assets are distinct from this external browser typography bundle. The downloadable TeXise release produced in this environment omits font binaries; restore any compiler font assets from the authoritative TeXise source if required by your deployment process.
