From e71f00b4c9bc483d5ce60e91e5fd461305e389eb Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sun, 31 Mar 2024 21:17:44 +0800 Subject: [PATCH] Fixed backporting of social plugin font loading logic --- material/plugins/social/plugin.py | 11 ----------- src/plugins/social/plugin.py | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/material/plugins/social/plugin.py b/material/plugins/social/plugin.py index a89600830..eb7e5ca35 100644 --- a/material/plugins/social/plugin.py +++ b/material/plugins/social/plugin.py @@ -500,17 +500,6 @@ class SocialPlugin(BasePlugin[SocialConfig]): if not fallback or len(name) < len(fallback): fallback = name - # Print warning in debug mode, since the font could not be resolved - if self.config.debug: - log.warning( - f"Couldn't find style '{style}' for font family '{family}'. " + - f"Styles available:\n\n" + - f"\n".join([os.path.splitext(file)[0] for file in list]) + - f"\n\n" - f"Falling back to: {fallback}\n" - f"\n" - ) - # Fall back to regular font (guess if there are multiple) return self._resolve_font(family, fallback) diff --git a/src/plugins/social/plugin.py b/src/plugins/social/plugin.py index a89600830..eb7e5ca35 100644 --- a/src/plugins/social/plugin.py +++ b/src/plugins/social/plugin.py @@ -500,17 +500,6 @@ class SocialPlugin(BasePlugin[SocialConfig]): if not fallback or len(name) < len(fallback): fallback = name - # Print warning in debug mode, since the font could not be resolved - if self.config.debug: - log.warning( - f"Couldn't find style '{style}' for font family '{family}'. " + - f"Styles available:\n\n" + - f"\n".join([os.path.splitext(file)[0] for file in list]) + - f"\n\n" - f"Falling back to: {fallback}\n" - f"\n" - ) - # Fall back to regular font (guess if there are multiple) return self._resolve_font(family, fallback)