mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed backporting of social plugin font loading logic
This commit is contained in:
parent
8956524097
commit
e71f00b4c9
@ -500,17 +500,6 @@ class SocialPlugin(BasePlugin[SocialConfig]):
|
|||||||
if not fallback or len(name) < len(fallback):
|
if not fallback or len(name) < len(fallback):
|
||||||
fallback = name
|
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)
|
# Fall back to regular font (guess if there are multiple)
|
||||||
return self._resolve_font(family, fallback)
|
return self._resolve_font(family, fallback)
|
||||||
|
|
||||||
|
@ -500,17 +500,6 @@ class SocialPlugin(BasePlugin[SocialConfig]):
|
|||||||
if not fallback or len(name) < len(fallback):
|
if not fallback or len(name) < len(fallback):
|
||||||
fallback = name
|
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)
|
# Fall back to regular font (guess if there are multiple)
|
||||||
return self._resolve_font(family, fallback)
|
return self._resolve_font(family, fallback)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user