You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of having this:
```
WARNING - Mismatched weight for 'Segoe Script' (requested weight 100-Thin, got 400-Regular).
Used on lines: 1
```
We now have this:
```
WARNING - Mismatched weight for 'Segoe Script' (requested weight 100-Thin, got 400-Regular).
Used on lines: 1
```
Copy file name to clipboardExpand all lines: font_collector/__main__.py
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -61,18 +61,24 @@ def main() -> None:
61
61
# Did not found the font
62
62
iffont_resultisNone:
63
63
nbr_font_not_found+=1
64
-
_logger.error(f"Could not find font '{style.fontname}'")
65
-
_logger.error(f"Used on lines: {' '.join(str(line) forlineinusage_data.ordered_lines)}")
64
+
_logger.error(
65
+
f"Could not find font '{style.fontname}'\n"
66
+
f"Used on lines: {' '.join(str(line) forlineinusage_data.ordered_lines)}"
67
+
)
66
68
else:
69
+
log_msg=""
67
70
iffont_result.need_faux_bold:
68
-
_logger.warning(f"Faux bold used for '{style.fontname}' (requested weight {style.weight}-{(font_weight_to_name(style.weight))}, got {font_result.font_face.weight}-{(font_weight_to_name(font_result.font_face.weight))}).")
71
+
log_msg=f"Faux bold used for '{style.fontname}' (requested weight {style.weight}-{(font_weight_to_name(style.weight))}, got {font_result.font_face.weight}-{(font_weight_to_name(font_result.font_face.weight))})."
69
72
eliffont_result.mismatch_bold:
70
-
_logger.warning(f"Mismatched weight for '{style.fontname}' (requested weight {style.weight}-{(font_weight_to_name(style.weight))}, got {font_result.font_face.weight}-{(font_weight_to_name(font_result.font_face.weight))}).")
73
+
log_msg=f"Mismatched weight for '{style.fontname}' (requested weight {style.weight}-{(font_weight_to_name(style.weight))}, got {font_result.font_face.weight}-{(font_weight_to_name(font_result.font_face.weight))})."
71
74
iffont_result.mismatch_italic:
72
-
_logger.warning(f"Mismatched italic for '{style.fontname}' (requested {'non-'ifstyle.italicelse''}italic, got {'non-'iffont_result.font_face.is_italicelse''}italic).")
75
+
log_msg=f"Mismatched italic for '{style.fontname}' (requested {'non-'ifstyle.italicelse''}italic, got {'non-'iffont_result.font_face.is_italicelse''}italic)."
0 commit comments