|
8 | 8 | --bad-border: rgb(244, 76, 78); |
9 | 9 | } |
10 | 10 |
|
11 | | -@font-face { |
12 | | - font-family: "Vazirmatn"; |
13 | | - src: url("fonts/Vazirmatn-VF.woff2") format("woff2"); |
14 | | - font-weight: 100 900; |
15 | | - font-style: normal; |
16 | | - font-display: swap; |
17 | | -} |
18 | | - |
19 | | -:lang(fa) :is( |
20 | | - body, |
21 | | - div.body :is(h1, h2, h3, h4, h5, h6), |
22 | | - form.inline-search input, |
23 | | - div.sphinxsidebar input, |
24 | | - div.related input |
25 | | -) { |
26 | | - font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; |
27 | | -} |
28 | | - |
29 | 11 | /* unset some styles from the classic stylesheet */ |
30 | 12 | div.document, |
31 | 13 | div.body, |
@@ -287,6 +269,28 @@ div.body hr { |
287 | 269 | height: 1px; |
288 | 270 | } |
289 | 271 |
|
| 272 | +/* Persian (fa) uses Vazirmatn, since the default system font stack renders |
| 273 | + Arabic-script text poorly on many platforms. This is scoped to :lang(fa) |
| 274 | + rather than [dir='rtl'] so other RTL languages (Arabic, Hebrew, Urdu...) |
| 275 | + and all LTR languages are unaffected. */ |
| 276 | +@font-face { |
| 277 | + font-family: "Vazirmatn"; |
| 278 | + src: url("fonts/Vazirmatn-VF.woff2") format("woff2"); |
| 279 | + font-weight: 100 900; |
| 280 | + font-style: normal; |
| 281 | + font-display: swap; |
| 282 | +} |
| 283 | + |
| 284 | +:lang(fa) :is( |
| 285 | + body, |
| 286 | + div.body :is(h1, h2, h3, h4, h5, h6), |
| 287 | + form.inline-search input, |
| 288 | + div.sphinxsidebar input, |
| 289 | + div.related input |
| 290 | +) { |
| 291 | + font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif; |
| 292 | +} |
| 293 | + |
290 | 294 | body[dir='rtl'] { |
291 | 295 | & pre, |
292 | 296 | & code, |
|
0 commit comments