Skip to content

Commit e71f00b

Browse files
committed
Fixed backporting of social plugin font loading logic
1 parent 8956524 commit e71f00b

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

Diff for: material/plugins/social/plugin.py

-11
Original file line numberDiff line numberDiff line change
@@ -500,17 +500,6 @@ def _resolve_font(self, family: str, style: str):
500500
if not fallback or len(name) < len(fallback):
501501
fallback = name
502502

503-
# Print warning in debug mode, since the font could not be resolved
504-
if self.config.debug:
505-
log.warning(
506-
f"Couldn't find style '{style}' for font family '{family}'. " +
507-
f"Styles available:\n\n" +
508-
f"\n".join([os.path.splitext(file)[0] for file in list]) +
509-
f"\n\n"
510-
f"Falling back to: {fallback}\n"
511-
f"\n"
512-
)
513-
514503
# Fall back to regular font (guess if there are multiple)
515504
return self._resolve_font(family, fallback)
516505

Diff for: src/plugins/social/plugin.py

-11
Original file line numberDiff line numberDiff line change
@@ -500,17 +500,6 @@ def _resolve_font(self, family: str, style: str):
500500
if not fallback or len(name) < len(fallback):
501501
fallback = name
502502

503-
# Print warning in debug mode, since the font could not be resolved
504-
if self.config.debug:
505-
log.warning(
506-
f"Couldn't find style '{style}' for font family '{family}'. " +
507-
f"Styles available:\n\n" +
508-
f"\n".join([os.path.splitext(file)[0] for file in list]) +
509-
f"\n\n"
510-
f"Falling back to: {fallback}\n"
511-
f"\n"
512-
)
513-
514503
# Fall back to regular font (guess if there are multiple)
515504
return self._resolve_font(family, fallback)
516505

0 commit comments

Comments
 (0)