Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/dmenchaca/webflow-to-react/self-hosted-fonts-vitegit clone --depth 1 https://github.com/dmenchaca/webflow-to-reactWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/dmenchaca/webflow-to-react/self-hosted-fonts-vite)<a href="https://agentmods.dev/rules/dmenchaca/webflow-to-react/self-hosted-fonts-vite"><img src="https://agentmods.dev/badge/rules/dmenchaca/webflow-to-react/self-hosted-fonts-vite.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00781 |
| Opus 5 | $0.00000 | $0.00391 |
| Sonnet 5 | $0.00000 | $0.00156 |
| Haiku 4.5 | $0.00000 | $0.00078 |
Grade A, and why
self-hosted-fonts-vite scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Self-hosted fonts (Vite / TanStack Start)
Fonts from a Webflow export are the single most common silent-failure point in this migration.
Rules
1. Fonts MUST live in web/public/fonts/
Vite's dev server refuses to serve files outside its root. If .woff2 files live anywhere else (e.g. <repo-root>/fonts/), the dev server returns 404 and the browser silently falls back to Arial. You only notice because the design looks "off."
2. Use root-relative URLs
/* YES */
src: url("/fonts/Inter_18pt-Regular.woff2") format("woff2");
/* NO */
src: url("../../fonts/Inter_18pt-Regular.woff2") format("woff2");
3. @font-face must be imported FIRST
In marketing.css:
@import "./site-fonts.css"; /* ← must be first */
@import "./marketing/normalize.css";
@import "./marketing/layout-components.css";
/* ... */
If body { font-family: "Foo" } is parsed before the matching @font-face rule, some browsers register it against a non-existent family and never retry.
4. Quote multi-word family names everywhere
/* YES */
font-family: "Plus Jakarta Sans", sans-serif;
/* NO — parser reads three families: Plus, Jakarta, Sans */
font-family: Plus Jakarta Sans, sans-serif;
5. Keep Webflow's quirky family names
Webflow exports often reference "Inter 18 Pt" or Plusjakartasans. The compiled CSS already uses those strings. Keep them — aliasing causes more bugs than it fixes.
6. One file, multiple weights when needed
If the export only ships PlusJakartaSans-ExtraBold.woff2, register it against BOTH 700 and 800 so font-weight: bold AND font-weight: 800 resolve without font synthesis.
7. Never default body to Arial
Some starters do this "for safety." Don't. Inherited text breaks wherever a component doesn't explicitly set a font. Use the brand body font on body with a sensible fallback stack.
8. Copy Webflow’s global font-smoothing into base CSS
css/webflow.css (and often inline <style> in the export index.html) sets on *:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 79 lines · 0 tokens per session scan A 1bc1da8d4e96
self-hosted-fonts-vite is a cursor rule published in the GitHub repository dmenchaca/webflow-to-react (27 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 781 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
ui-components
USE WHEN: Building UI components, structuring layouts, and applying styles using Tailwind CSS.
performance
USE WHEN: Optimizing Core Web Vitals, managing assets, and ensuring high Lighthouse/A11y scores.
css-styling
CSS architecture, tokens, and styling rules for this Docusaurus site. Apply when creating or modifying components, styles, layouts, or any UI-facing code.
ts
Cursor rule "ts" from un-pany/v3-admin-vite, covering ts 开发规范, 类型, 命名, 代码组织 and 错误处理.
git
辅助生成 Git 提交信息和执行 Git 命令.
frontend
Demo Shop frontend guidance.