| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1c06de3 commit cb405cf
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -395,12 +395,10 @@ def ttfFontProperty(font): | |||
| 395 | 395 | else: | |
| 396 | 396 | variant = 'normal' | |
| 397 | 397 | ||
| 398 | - weight = next((w for w in weight_dict if sfnt4.find(w) >= 0), None) | ||
| 399 | - if not weight: | ||
| 400 | - if font.style_flags & ft2font.BOLD: | ||
| 401 | - weight = 700 | ||
| 402 | - else: | ||
| 403 | - weight = 400 | ||
| 398 | + if font.style_flags & ft2font.BOLD: | ||
| 399 | + weight = 700 | ||
| 400 | + else: | ||
| 401 | + weight = next((w for w in weight_dict if w in sfnt4), 400) | ||
| 404 | 402 | ||
| 405 | 403 | # Stretch can be absolute and relative | |
| 406 | 404 | # Absolute stretches are: ultra-condensed, extra-condensed, condensed, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments