Skip to content

Add webpage translation font previews - #5

Merged
ycosine merged 1 commit into
mainfrom
agent/options-font-preview
Jul 16, 2026
Merged

Add webpage translation font previews#5
ycosine merged 1 commit into
mainfrom
agent/options-font-preview

Conversation

@ycosine

@ycosine ycosine commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a webpage translation font picker and bilingual preview to Options
  • default webpage translations to bundled LXGW WenKai Lite, with match-page, system sans, and system serif alternatives
  • update already-injected webpage translations live when the setting changes
  • bundle the official LXGW WenKai Lite v1.522 Regular TTF and SIL OFL 1.1 notice for offline use

Why

Video subtitles already show a live typography preview, while webpage translations had no equivalent preview or configurable font. This makes the webpage result visible before translating and gives Chinese translations a readable default font.

Impact

Existing settings are normalized to the new LXGW WenKai Lite default. The selected font applies only to translated text inserted into webpages; source-page text and video subtitle settings remain unchanged.

Validation

  • pnpm -F @extension/content-script test (23 tests)
  • pnpm lint
  • pnpm type-check
  • pnpm build
  • verified the built font and OFL files under dist/options/fonts/

Stack

Depends on #4. The PR base is agent/elevenlabs-asr-fallback so this diff contains only the font preview work.

@ycosine
ycosine changed the base branch from agent/elevenlabs-asr-fallback to main July 16, 2026 09:40
@ycosine
ycosine marked this pull request as ready for review July 16, 2026 09:42
@ycosine
ycosine merged commit 58975ae into main Jul 16, 2026
2 checks passed
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