Skip to content

build(fonts): remove legacy KaTeX font formats - #594

Merged
murongg merged 1 commit into
v2from
chore/optimize-katex-fonts
Jul 28, 2026
Merged

build(fonts): remove legacy KaTeX font formats#594
murongg merged 1 commit into
v2from
chore/optimize-katex-fonts

Conversation

@murongg

@murongg murongg commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the bundled Noto Sans SC Variable font unchanged and add regression coverage for editor fallbacks
  • rewrite KaTeX font-face sources to WOFF2 during production builds
  • remove only legacy KaTeX WOFF and TTF assets no longer referenced by generated CSS

Why

  • recover about 0.78 MiB, or 5.6%, from the desktop frontend bundle without sacrificing cross-platform font consistency or glyph coverage

Validation

  • pnpm --filter @markra/scripts test — 7 tests passed
  • pnpm --filter @markra/app test -- src/styles.test.ts — 60 tests passed
  • pnpm --filter @markra/editor test -- src/codemirror/code-block.test.ts src/codemirror/frontmatter-preview.test.ts — 36 tests passed
  • pnpm build — workspace, web, desktop, and 15 vendor chunk imports passed
  • pnpm tauri build --bundles app — macOS release app built and launched successfully
  • packaged-app smoke test — multilingual text, inline math, display integral, and large delimiters rendered correctly; no font or resource errors appeared in logs

Risk

  • KaTeX now ships WOFF2 only in generated bundles. Current targets handle WOFF2, and the build plugin retains any legacy asset still referenced if upstream CSS output changes.
  • Windows and Linux native packages were not built or runtime-smoke-tested in this local macOS environment.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview, Comment Jul 28, 2026 9:25am

@murongg
murongg merged commit c72d431 into v2 Jul 28, 2026
21 checks passed
@murongg
murongg deleted the chore/optimize-katex-fonts branch July 28, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant