Skip to content

feat(i18n): add Vazirmatn for Persian and Arabic - #1643

Open
danialshirali16 wants to merge 1 commit into
getopenscreen:mainfrom
danialshirali16:feat/vazirmatn-font
Open

danialshirali16 wants to merge 1 commit into
getopenscreen:mainfrom
danialshirali16:feat/vazirmatn-font

Conversation

@danialshirali16

@danialshirali16 danialshirali16 commented Nov 21, 2026 •

Copy link
Copy Markdown

Summary

  • Bundle the official Vazirmatn 33.003 assets and the SIL OFL notice. The Persian (fa) and Arabic (ar) interfaces use the local variable font for Arabic-script text. Latin UI glyphs use Geist.
  • Add Vazirmatn to the existing caption font picker and ship its regular and bold faces for native rendering.
  • Cover Persian and Arabic glyphs in both weights and the saved caption font choice.

Related work

The Persian locale is proposed in #1642. This branch targets main independently. The Arabic interface and caption font picker can be exercised from this branch.

Type of change

  • Feature

Release impact

  • Minor

Desktop impact

  • Installer / packaging
  • Not platform-specific

Testing

  • npm run i18n:check, app and test type checks, and npm run build-vite.
  • npm run test on macOS (5,785 passed, 8 skipped).
  • Checked the production UI in Chromium with external requests blocked. Verified the actual glyph fonts after switching English → Arabic → Persian → English. The Persian smoke build included the locale files from feat(i18n): add Persian (fa) locale #1642.
  • Rendered Persian bold and Arabic regular with the native macOS compositor and verified a 30-frame MP4 export.

Summary by CodeRabbit

  • New Features
    • Added Vazirmatn as a font option for captions and annotations.
    • Persian and Arabic interface text now uses Vazirmatn UI, while retaining Geist as a fallback.
  • Documentation
    • Added Vazirmatn’s font licensing information.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds Vazirmatn to the text font families and configures it for Persian and Arabic UI text. It also adds font selection and glyph metric test coverage, plus Vazirmatn’s license and attribution.

Changes: Vazirmatn font integration

Layer / File(s) Summary
Register and apply Vazirmatn
src/lib/textFonts.ts, src/styles/fonts.css, src/styles/design-tokens.css, src/components/ai-edition/CaptionsPane.choices.test.tsx, src/lib/ai-edition/annotations/fontTables.test.ts, crates/compositor/src/text_fonts.rs, public/fonts/Vazirmatn-OFL.txt, THIRD-PARTY-NOTICES.md
The text font family list and Persian and Arabic UI font rules include Vazirmatn. Tests cover font selection and glyph metrics. The font license and upstream attribution are added to the repository.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related PRs

Merge Risk: Minimal · up to 2f116

This change adds a local Vazirmatn font for Persian and Arabic text and offers it in the caption font picker. No actionable merge-blocking issue was found, so it looks safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(i18n): add Vazirmatn for Persian and Arabic" states the main change: bundling the Vazirmatn font to support Persian and Arabic interfaces. The changeset adds the font files, license no…
Description check Passed The description follows the template's main sections: Summary, Related work, Type of change, Release impact, Desktop impact, and Testing. It describes the Vazirmatn bundling, the caption font picker c…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(i18n): add Vazirmatn for Persian and Arabic" states the main change: bundling the Vazirmatn font to support Persian and Arabic interfaces. The changeset adds the font files, license notice, font-face and token CSS, the TEXT_FONT_FAMILIES entry, and tests covering Persian and Arabic glyphs, all of which match the title.

Full details: Description check

Explanation

The description follows the template's main sections: Summary, Related work, Type of change, Release impact, Desktop impact, and Testing. It describes the Vazirmatn bundling, the caption font picker change, the Persian and Arabic glyph coverage, and the test commands run. The template's Related issue section ("Fixes #") is missing. The Screenshots / video section is also missing, although the change is visual and the template asks for screenshots or a video for UI changes. The author replaced the Related issue section with a Related work section that references #1642 but does not link an issue.

Resolution

Consider adding the Related issue line (for example, "Fixes #" or "Refs #") and a Screenshots / video section for the Arabic and Persian UI and caption font picker changes. These are non-critical omissions, so the check still passes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e6089435-780a-4c75-9f38-fab82022a5ab
Commits

Reviewing files that changed from the base of the PR and between 00a0d96 and 2f11651.

Files ignored due to path filters: 3

  • public/fonts/Vazirmatn-Bold.ttf is excluded by !**/*.ttf
  • public/fonts/Vazirmatn-Regular.ttf is excluded by !**/*.ttf
  • src/assets/fonts/Vazirmatn-Variable.woff2 is excluded by !**/*.woff2
Files selected for processing: 8

  • THIRD-PARTY-NOTICES.md
  • crates/compositor/src/text_fonts.rs
  • public/fonts/Vazirmatn-OFL.txt
  • src/components/ai-edition/CaptionsPane.choices.test.tsx
  • src/lib/ai-edition/annotations/fontTables.test.ts
  • src/lib/textFonts.ts
  • src/styles/design-tokens.css
  • src/styles/fonts.css

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

This branch has not been deployed

No deployments
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