tools (common/template): add brands style in icon definitions:
`brands` is notably needed for the new XMPP icon available in font-awesome.
This commit is contained in:
parent
7fed56203b
commit
0fbf74aad6
1 changed files with 8 additions and 9 deletions
|
|
@ -1032,16 +1032,15 @@ class Renderer:
|
|||
for name in names:
|
||||
if "/" in name:
|
||||
raise ValueError("SVG name must not have a `/` in it.")
|
||||
if name.startswith("regular "):
|
||||
filename = name[8:]
|
||||
path = self.fa_svgs_path / f"regular/{filename}.svg"
|
||||
for style_name in ("regular", "brands", "solid"):
|
||||
if name.startswith(f"{style_name} "):
|
||||
style = style_name
|
||||
filename = name.removeprefix(f"{style_name} ")
|
||||
break
|
||||
else:
|
||||
if name.startswith("solid "):
|
||||
# "solid" can be explicitely specified, and it's the default value.
|
||||
filename = name[6:]
|
||||
else:
|
||||
filename = name
|
||||
path = self.fa_svgs_path / f"solid/{filename}.svg"
|
||||
style = "solid"
|
||||
filename = name
|
||||
path = self.fa_svgs_path / f"{style}/{filename}.svg"
|
||||
|
||||
# Parse the source SVG
|
||||
try:
|
||||
|
|
|
|||
Loading…
Reference in a new issue