mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
Write font files as binary instead of text (#3039)
This caused the font files to be corrupt and rejected by the browser's sanitising engine.
This commit is contained in:
parent
e77c2e3e10
commit
888658dbff
|
|
@ -100,9 +100,9 @@ for line in original_contents:
|
|||
font_family, font_lang, font_style, font_weight
|
||||
)
|
||||
font_filepath = font_output_dir + filename
|
||||
with open(font_filepath, "w") as f:
|
||||
with open(font_filepath, "wb") as f:
|
||||
print("Writing font file:", font_filepath)
|
||||
f.write(resp.text)
|
||||
f.write(resp.content)
|
||||
|
||||
# Replace google URL with local URL
|
||||
line = re.sub(r"url\(.+\)", f"url({css_font_path + filename})", line)
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue