Skip to content

Add Vazirmatn font for Farsi#3463

Merged
tomthorogood merged 3 commits intogithub:mainfrom
Revisto:feat/fa-vazirmatn-font-support
Aug 8, 2025
Merged

Add Vazirmatn font for Farsi#3463
tomthorogood merged 3 commits intogithub:mainfrom
Revisto:feat/fa-vazirmatn-font-support

Conversation

@Revisto
Copy link
Copy Markdown
Contributor

@Revisto Revisto commented Jun 27, 2025

  • Have you followed the contributing guidelines?
  • Have you explained what your changes do, and why they add value to the Guides?

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


This PR introduces the Vazirmatn font to improve the readability of Farsi (Persian) content.

This change adds the Vazirmatn variable font and applies it globally to all elements when the language is fa. Vazirmatn is a free (as in freedom) Persian/Arabic font project that is extremely popular in Persian web content.

Font source and license: https://github.com/rastikerdar/vazirmatn

Before / After

Side-by-side comparison of Persian text rendering. Left: default font. Right: Vazirmatn font.
Before (left) and after (right) applying the Vazirmatn font. The new font improves readability for Persian text.

Copilot AI review requested due to automatic review settings June 27, 2025 17:13
@Revisto Revisto requested a review from a team as a code owner June 27, 2025 17:13
@Revisto Revisto temporarily deployed to Pages Preview June 27, 2025 17:13 — with GitHub Actions Inactive
@Revisto Revisto temporarily deployed to Pages Preview June 27, 2025 17:14 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds the Vazirmatn variable font and globally applies it to Farsi content, along with setting RTL direction for headings.

  • Defines a new @font-face for Vazirmatn with variable weight range
  • Scopes Farsi typography styles under a universal lang(fa) selector
  • Applies RTL direction to headings within Farsi content
Comments suppressed due to low confidence (2)

assets/css/custom.scss:254

  • [nitpick] It may help future maintainers to add a comment with the font source URL and license under the @font-face declaration for clarity and attribution.
@font-face {

assets/css/custom.scss:256

  • [nitpick] Check that the absolute URL /assets/fonts/... resolves correctly in all deploy contexts; you might use a relative path (../fonts/...) or a build helper to ensure correct asset resolution.
  src: url('/assets/fonts/Vazirmatn-Variable.woff2') format('woff2-variations');

Comment thread assets/css/custom.scss
font-display: swap;
}

*:lang(fa) {
Copy link

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a universal selector here (*) can degrade rendering performance and may unintentionally affect non-text elements. Consider scoping to html:lang(fa) or body:lang(fa) instead.

Copilot uses AI. Check for mistakes.
Comment thread assets/css/custom.scss Outdated
Comment on lines +271 to +272
* {
font-family: 'Vazirmatn', sans-serif;
Copy link

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This nested universal selector will apply the font to every descendant, including icons or inline code. Restrict the selector to common text containers (e.g., body, p, h1, h2, blockquote).

Suggested change
* {
font-family: 'Vazirmatn', sans-serif;
body,
p,
h1,
h2,
h3,
blockquote {
font-family: 'Vazirmatn', sans-serif;

Copilot uses AI. Check for mistakes.
Replaces the universal selector (*) with a specific list of text-containing elements for applying the Vazirmatn font.
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jul 30, 2025
@eason456722-go
Copy link
Copy Markdown

eason456722-go commented Jul 30, 2025 via email

@Revisto
Copy link
Copy Markdown
Contributor Author

Revisto commented Jul 30, 2025

Can someone please review the pull request?

@github-actions github-actions bot removed the stale label Jul 31, 2025
@tomthorogood tomthorogood added this pull request to the merge queue Aug 8, 2025
Merged via the queue into github:main with commit 79ee1bc Aug 8, 2025
3 checks passed
@ashganhammad
Copy link
Copy Markdown

const app = new Vue({
el: '#app',
data: {
title: 'Vue Basics'
},
methods: {
greet() {
return Hello, ${this.title};
}
}
});

Copy link
Copy Markdown

@Marisa2312 Marisa2312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marisa2312

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.

6 participants