Skip to content

Add Vazirmatn support for Farsi - #331

Open
sepehr-rs wants to merge 5 commits into
python:mainfrom
sepehr-rs:add-vazirmatn
Open

sepehr-rs wants to merge 5 commits into
python:mainfrom
sepehr-rs:add-vazirmatn

Conversation

@sepehr-rs

Copy link
Copy Markdown
Contributor

Adds Vazirmatn for Farsi builds. Vazirmatn is an open-source font licensed under the SIL Open Font License. Adding this to Farsi builds improves the readability and quality of the documentation.
I didn't touch the broader RTL fonts and kept it scoped to Farsi with :lang(fa). The font is bundled as a single variable WOFF2 file in static/fonts/, with its OFL.txt alongside.

With Vazirmatn:
image
image

Before:
image
image

Please let me know if any changes or additions are needed. Thanks in advance!

@read-the-docs-community

read-the-docs-community Bot commented Sep 20, 2026

Copy link
Copy Markdown

Comment thread python_docs_theme/static/pydoctheme.css Outdated
Comment on lines +272 to +275
/* Persian (fa) uses Vazirmatn, since the default system font stack renders
Arabic-script text poorly on many platforms. This is scoped to :lang(fa)
rather than [dir='rtl'] so other RTL languages (Arabic, Hebrew, Urdu...)
and all LTR languages are unaffected. */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
/* Persian (fa) uses Vazirmatn, since the default system font stack renders
Arabic-script text poorly on many platforms. This is scoped to :lang(fa)
rather than [dir='rtl'] so other RTL languages (Arabic, Hebrew, Urdu...)
and all LTR languages are unaffected. */
/* Persian (fa) uses Vazirmatn, since the default system font stack renders
Arabic-script text poorly on many platforms. */

The rest just repeats what's below, so I suggest we drop it.

}

:lang(fa) :is(
body,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What about buttons and selects, I don't think they inherit here?

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.

2 participants