| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Documentation build overview19 files changed · ± 19 modified ± Modified |
Sorry, something went wrong.
Co-authored-by: Stan Ulbrych <stan@python.org>
|
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: 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? |
Sorry, something went wrong.
|
Vazirmatn is unmaintained following the death of its creator: Vazirharf is a maintained fork, is that suitable? 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:
Can we use the Non-Latin version? That'd reduce it by around half:
|
Sorry, something went wrong.
|
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: Please let me know what you think is best going forward, and thanks for the review! |
Sorry, something went wrong.
|
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! |
Sorry, something went wrong.
There was a problem hiding this comment.
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.
|
Thanks a lot for the review! I'll open a separate PR for that change. |
Sorry, something went wrong.
|
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? |
Sorry, something went wrong.
|
I think we can just ignore the warning? |
Sorry, something went wrong.
for more information, see https://pre-commit.ci
|
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. |
Sorry, something went wrong.
|
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. |
Sorry, something went wrong.
|
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:
|
Sorry, something went wrong.
|
Thanks a lot for taking the time to explain this to me! I understand it now =). |
Sorry, something went wrong.
| div.body :is(h1, h2, h3, h4, h5, h6), | ||
| div.sphinxsidebar :is(h3, h4), | ||
| input, | ||
| select, | ||
| textarea, | ||
| button:not(.copybutton) |
There was a problem hiding this comment.
This all seems a little duplicative, maybe just:
body,
input,
select,
textarea,
button:not(.copybutton),
should work?
Sorry, something went wrong.
There was a problem hiding this comment.
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.
|
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! |
Sorry, something went wrong.
|
Thanks a lot for the thorough review from both of you @StanFromIreland @hugovk! I really appreciate it =). |
Sorry, something went wrong.
|
@sepehr-rs And thanks for all your work on this! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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:


Before:


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