GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Vazirmatn (v33.003) support for Farsi by sepehr-rs · Pull Request #331 · python/python-docs-theme

Conversation

@sepehr-rs

@sepehr-rs sepehr-rs commented Sep 20, 2026

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!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sepehr-rs and others added 4 commits September 20, 2026 19:19
@sepehr-rs
Add Vazirmatn font and OFL license
77e605d
@sepehr-rs
Add Vazirmatn support to pydoctheme.css
52ea00b
@pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hooks
7ad1951
for more information, see https://pre-commit.ci
@sepehr-rs
Remove redundant comment from earlier pass
5822f35
@read-the-docs-community

read-the-docs-community Bot commented Sep 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 python-docs-theme-previews | 🛠️ Build #34711042 | 📁 Comparing 8fea77a against latest (a89775c)

  🔍 Preview build  

19 files changed · ± 19 modified

± Modified

  • download.html
  • genindex-C.html
  • genindex-L.html
  • genindex-R.html
  • genindex-T.html
  • genindex-all.html
  • c-api/unicode.html
  • library/asyncio-task.html
  • library/ctypes.html
  • library/ipaddress.html
  • and 9 more...
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed Sep 20, 2026
View reviewed changes
Comment thread python_docs_theme/static/pydoctheme.css Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs
Update pydoctheme.css
37a452b
StanFromIreland
StanFromIreland reviewed Sep 20, 2026
View reviewed changes
Comment thread python_docs_theme/static/pydoctheme.css Resolved

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed Sep 20, 2026
View reviewed changes
Comment thread python_docs_theme/static/pydoctheme.css Resolved

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland
StanFromIreland requested a review from hugovk September 20, 2026 19:34
sepehr-rs and others added 2 commits September 21, 2026 06:58
@sepehr-rs @StanFromIreland
Update python_docs_theme/static/pydoctheme.css
d812c19
Co-authored-by: Stan Ulbrych <[email protected]>
@sepehr-rs
Address review comments
3ef7fec
@sepehr-rs

sepehr-rs commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

Sidenote: I found an issue with the sidebar while investigating this; The sidebar button's direction is reversed in RTL mode:

When closed:
image
When open:
image

I think it'd be a very small fix, but should I make a separate PR for it, or fix it here if the scope creep is acceptable?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Sep 21, 2026

Copy link
Copy Markdown
Member

Vazirmatn is unmaintained following the death of its creator:

  • https://github.com/rastikerdar/vazirmatn
  • https://en.wikipedia.org/wiki/Saber_Rastikerdar

Vazirharf is a maintained fork, is that suitable?

  • https://github.com/nadalaba/vazirharf

In either case, the current .woff isn't too large at 109 KB, so bundling should be fine so we don't need to use a CDN. But Vazirmatn says:

For Latin glyphs, Vazirmatn is combined with Roboto font by a build script, however there is also a version without Latin glyphs (Non-Latin).

Can we use the Non-Latin version? That'd reduce it by around half:

  • Vazirmatn: I think we'd need these two:

    • 22 KB: https://github.com/nadalaba/vazirharf/blob/v34.003/misc/Non-Latin/fonts/webfonts/Vazirharf-NL%5Bwght%5D.woff2
    • 22 KB: https://github.com/rastikerdar/vazirmatn/blob/v33.003/misc/Non-Latin/fonts/webfonts/Vazirmatn-NL-Bold.woff2
  • Vazirharf: just this one?

    • 50 KB https://github.com/nadalaba/vazirharf/blob/v34.003/misc/Non-Latin/fonts/webfonts/Vazirharf-NL%5Bwght%5D.woff2
StanFromIreland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs

sepehr-rs commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

I don't oppose using a fork, but the font and its glyph coverage are stable, and the fork doesn't offer a benefit that matters for documentation (its only difference is how Lam-Alef is handled, which is aimed at typing sites). There's also no visible difference between the two, so I'd slightly lean towards staying with the original upstream release. That said, I'm happy to switch if the project prefers a maintained font, so I'll leave the decision to you.

Good point on the Non-Latin build. Vazirmatn also has a variable-weight Non-Latin version, and it's slightly smaller than Vazirharf's:

  • 46.8 KB: https://github.com/rastikerdar/vazirmatn/blob/master/misc/Non-Latin/fonts/webfonts/Vazirmatn-NL%5Bwght%5D.woff2

Please let me know what you think is best going forward, and thanks for the review!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Sep 21, 2026

Copy link
Copy Markdown
Member

Let's stick with the original then, and go with that Non-Latin version.

We can switch to a fork later if there's a concrete need to do so. Thanks!

sepehr-rs reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs
Use Vazirmatn's Non-Latin version
bc2a608
@hugovk hugovk changed the title Add Vazirmatn support for Farsi Add Vazirmatn (v33.003) support for Farsi Sep 21, 2026
hugovk
hugovk approved these changes Sep 21, 2026
View reviewed changes

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks! I added the version number in the title, so it'll go into the commit message, so we can easily check the version.

I think it'd be a very small fix, but should I make a separate PR for it, or fix it here if the scope creep is acceptable?

Let's do a new PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sepehr-rs reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@sepehr-rs

sepehr-rs commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks a lot for the review! I'll open a separate PR for that change.

hugovk and StanFromIreland reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland reviewed Sep 21, 2026
View reviewed changes
Comment thread python_docs_theme/static/fonts/OFL.txt Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs
Add OFL license to license-files
8d38c99
@sepehr-rs

sepehr-rs commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

The CI is failing with W002: Wheel contains duplicate files. Should we ignore the warning or exclude the package copy from the wheel with build.targets.wheel.exclude?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented Sep 21, 2026

Copy link
Copy Markdown
Member

I think we can just ignore the warning?

sepehr-rs reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sepehr-rs and others added 2 commits September 21, 2026 19:48
@sepehr-rs
Ignore W002 warning
d738ada
@pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hooks
80b6242
for more information, see https://pre-commit.ci
@hugovk

hugovk commented Sep 21, 2026

Copy link
Copy Markdown
Member

Let's rather exclude, so we only have one copy in the expected place? Something this:

build.targets.wheel.exclude = [ "python_docs_theme/locale/**/*.po", "python_docs_theme/static/fonts/OFL.txt" ]

Ignoring W002 means we could easily end up with other duplicates in the future without realising.

sepehr-rs reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs
Exclude OFL.txt in pyproject.toml
02664c6
@sepehr-rs

sepehr-rs commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Makes sense. Excluded OFL.txt in pyproject.toml. One question though: doesn't this mean the license won't appear next to the font in the package? I thought the license should be bundled alongside the font.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Sep 21, 2026

Copy link
Copy Markdown
Member

We can see the contents of the sdist at https://github.com/python/python-docs-theme/actions/runs/35627886765

It has the licence next to the font:

│   ├── [2026-09-21T16:48:06Z]  static
│   │   ├── [2026-09-21T16:47:48Z]  copybutton.js
│   │   ├── [2026-09-21T16:48:06Z]  fonts
│   │   │   ├── [2026-09-21T16:47:48Z]  OFL.txt
│   │   │   └── [2026-09-21T16:47:48Z]  Vazirmatn-NL-VF.woff2

And it also shows the wheel, with the licence in the designated licenses metadata subdir:

└── python_docs_theme-2026.9.dist-info
    ├── METADATA
    ├── RECORD
    ├── WHEEL
    ├── entry_points.txt
    └── licenses
        ├── LICENSE
        └── python_docs_theme
            └── static
                └── fonts
                    └── OFL.txt

But it doesn't need to be directly next to the font. The licence says:

  1. Original or Modified Versions of the Font Software may be bundled,
    redistributed and/or sold with any software, provided that each copy
    contains the above copyright notice and this license. These can be
    included either as stand-alone text files, human-readable headers or
    in the appropriate machine-readable metadata fields within text or
    binary files as long as those fields can be easily viewed by the user.
  • "... provided that each copy contains the above copyright" -> "Copyright 2015 The Vazirmatn Project Authors (https://github.com/rastikerdar/vazirmatn)"

  • "and this license" -> check

  • "These can be included ... in the appropriate machine-readable metadata fields within text or binary files" -> using the wheel metadata for licences in the Core Metadata Spec defined by PEP 639.

sepehr-rs reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs

sepehr-rs commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks a lot for taking the time to explain this to me! I understand it now =).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs sepehr-rs mentioned this pull request Sep 22, 2026
Fix sidebarbutton CSS styling #332
Closed
StanFromIreland
StanFromIreland reviewed Sep 22, 2026
View reviewed changes
Comment thread python_docs_theme/static/pydoctheme.css Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread python_docs_theme/static/pydoctheme.css Outdated
Comment on lines +284 to +289
div.body :is(h1, h2, h3, h4, h5, h6),
div.sphinxsidebar :is(h3, h4),
input,
select,
textarea,
button:not(.copybutton)

@StanFromIreland StanFromIreland Sep 22, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This all seems a little duplicative, maybe just:

    body,
    input,
    select,
    textarea,
    button:not(.copybutton),

should work?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@sepehr-rs sepehr-rs Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Actually no, I had to make it even more specific; otherwise, the font wouldn’t apply to some elements. Several theme rules set font-family directly on headers and sidebar/related inputs, which overrides inheritance from body. So I had to target those elements directly to override those rules.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread python_docs_theme/static/pydoctheme.css Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs
Address review comments
8fea77a
@sepehr-rs

sepehr-rs commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Hey @StanFromIreland, just checking in on this. I think it's ready to merge, and I’d love to see Vazirmatn support added to the Farsi documentation!

hugovk reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland
StanFromIreland approved these changes Sep 30, 2026
View reviewed changes
@StanFromIreland
StanFromIreland merged commit 2e0d368 into python:main Sep 30, 2026
14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@sepehr-rs

sepehr-rs commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks a lot for the thorough review from both of you @StanFromIreland @hugovk! I really appreciate it =).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk

hugovk commented Sep 30, 2026

Copy link
Copy Markdown
Member

@sepehr-rs And thanks for all your work on this!

sepehr-rs reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk approved these changes
@StanFromIreland StanFromIreland StanFromIreland approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@sepehr-rs @hugovk @StanFromIreland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.