Skip to content

Commit 5870154

Browse files
committed
Add Vazirmatn support
1 parent e2cc426 commit 5870154

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

109 KB
Binary file not shown.

python_docs_theme/static/pydoctheme.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@
77
--bad-color: rgb(159 49 51);
88
--bad-border: rgb(244, 76, 78);
99
}
10+
@font-face {
11+
font-family: 'Vazirmatn';
12+
src: url('../fonts/Vazirmatn[wght].woff2') format('woff2');
13+
font-weight: 100 900;
14+
font-style: normal;
15+
font-display: swap;
16+
}
17+
18+
/* Apply Vazirmatn only when the page is RTL */
19+
html[dir='rtl'] body,
20+
html[dir='rtl'] div.sphinxsidebar,
21+
html[dir='rtl'] .menu {
22+
font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'avenir next', avenir,
23+
'segoe ui', 'helvetica neue', helvetica, Cantarell, Ubuntu, roboto,
24+
noto, arial, sans-serif;
25+
}
26+
27+
/* Keep code blocks LTR and in the monospace stack — don't let Vazirmatn leak in */
28+
html[dir='rtl'] tt,
29+
html[dir='rtl'] code,
30+
html[dir='rtl'] pre {
31+
font-family: Menlo, Consolas, Monaco, 'Liberation Mono', 'Lucida Console', monospace;
32+
}
1033

1134
/* unset some styles from the classic stylesheet */
1235
div.document,

0 commit comments

Comments
 (0)