-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: manually download fonts instead of yarn
- the npm packages are outdated - we do not need anything besides woff2
- Loading branch information
Showing
87 changed files
with
93 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[source-code-woff2] | ||
destination = "weblate_web/static/vendor/font-source/WOFF2/TTF" | ||
extract = [ | ||
"WOFF2/TTF/SourceCodePro-Bold.ttf.woff2", | ||
"WOFF2/TTF/SourceCodePro-ExtraLight.ttf.woff2", | ||
"WOFF2/TTF/SourceCodePro-It.ttf.woff2", | ||
"WOFF2/TTF/SourceCodePro-Medium.ttf.woff2", | ||
"WOFF2/TTF/SourceCodePro-Regular.ttf.woff2", | ||
"WOFF2/TTF/SourceCodePro-Semibold.ttf.woff2" | ||
] | ||
url = "https://github.com/adobe-fonts/source-code-pro/releases/download/{version_quoted}/WOFF2-source-code-pro-{version_underscore}.zip" | ||
# renovate: datasource=github-releases depName=adobe-fonts/source-code-pro | ||
version = "2.042R-u/1.062R-i/1.026R-vf" | ||
|
||
[source-sans-woff2] | ||
destination = "weblate_web/static/vendor/font-source/WOFF2/TTF" | ||
extract = [ | ||
"WOFF2/TTF/SourceSans3-Black.ttf.woff2", | ||
"WOFF2/TTF/SourceSans3-BoldIt.ttf.woff2", | ||
"WOFF2/TTF/SourceSans3-Bold.ttf.woff2", | ||
"WOFF2/TTF/SourceSans3-ExtraLight.ttf.woff2", | ||
"WOFF2/TTF/SourceSans3-It.ttf.woff2", | ||
"WOFF2/TTF/SourceSans3-Light.ttf.woff2", | ||
"WOFF2/TTF/SourceSans3-Regular.ttf.woff2", | ||
"WOFF2/TTF/SourceSans3-Semibold.ttf.woff2" | ||
] | ||
url = "https://github.com/adobe-fonts/source-sans/releases/download/{version}/WOFF2-source-sans-{version}.zip" | ||
# renovate: datasource=github-releases depName=adobe-fonts/source-sans | ||
version = "3.052R" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import tomllib | ||
from io import BytesIO | ||
from pathlib import Path, PurePath | ||
from urllib.parse import quote | ||
from zipfile import ZipFile | ||
|
||
import requests | ||
|
||
with open("scripts/fonts.toml", "rb") as handle: | ||
FONTS = tomllib.load(handle) | ||
|
||
for name, font in FONTS.items(): | ||
print(f"Processing {name}...") | ||
url = font["url"].format( | ||
version_quoted=quote(font["version"], safe=""), | ||
version_underscore=font["version"].replace("/", "_").replace("-vf", "vf"), | ||
**font, | ||
) | ||
destination = Path(font["destination"]) | ||
print(f"Download {url}...") | ||
response = requests.get(url, timeout=30) | ||
response.raise_for_status() | ||
with ZipFile(BytesIO(response.content)) as zipfile: | ||
for filename in font["extract"]: | ||
output = destination / PurePath(filename).name | ||
print(f"Writing out {output}...") | ||
output.write_bytes(zipfile.read(filename)) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file removed
BIN
-124 KB
weblate_web/static/vendor/font-source/OTF/SourceCodePro-ExtraLight.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-130 KB
weblate_web/static/vendor/font-source/OTF/SourceCodePro-Semibold.otf
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-137 KB
weblate_web/static/vendor/font-source/TTF/SourceCodePro-ExtraLight.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-135 KB
weblate_web/static/vendor/font-source/TTF/SourceCodePro-Semibold.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-318 KB
weblate_web/static/vendor/font-source/TTF/SourceSans3-ExtraLight.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-85.7 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceCodePro-Bold.otf.woff
Binary file not shown.
Binary file removed
BIN
-78.8 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceCodePro-ExtraLight.otf.woff
Binary file not shown.
Binary file removed
BIN
-69.4 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceCodePro-It.otf.woff
Binary file not shown.
Binary file removed
BIN
-85.1 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceCodePro-Medium.otf.woff
Binary file not shown.
Binary file removed
BIN
-84.5 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceCodePro-Regular.otf.woff
Binary file not shown.
Binary file removed
BIN
-85.2 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceCodePro-Semibold.otf.woff
Binary file not shown.
Binary file removed
BIN
-179 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-Black.otf.woff
Binary file not shown.
Binary file removed
BIN
-188 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-Bold.otf.woff
Binary file not shown.
Binary file removed
BIN
-142 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-BoldIt.otf.woff
Binary file not shown.
Binary file removed
BIN
-165 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-ExtraLight.otf.woff
Binary file not shown.
Binary file removed
BIN
-140 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-It.otf.woff
Binary file not shown.
Binary file removed
BIN
-177 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-Light.otf.woff
Binary file not shown.
Binary file removed
BIN
-184 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-Regular.otf.woff
Binary file not shown.
Binary file removed
BIN
-185 KB
weblate_web/static/vendor/font-source/WOFF/OTF/SourceSans3-Semibold.otf.woff
Binary file not shown.
Binary file removed
BIN
-66.5 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceCodePro-Bold.ttf.woff
Binary file not shown.
Binary file removed
BIN
-65 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceCodePro-ExtraLight.ttf.woff
Binary file not shown.
Binary file removed
BIN
-57.1 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceCodePro-It.ttf.woff
Binary file not shown.
Binary file removed
BIN
-66.4 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceCodePro-Medium.ttf.woff
Binary file not shown.
Binary file removed
BIN
-66.6 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceCodePro-Regular.ttf.woff
Binary file not shown.
Binary file removed
BIN
-66.5 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceCodePro-Semibold.ttf.woff
Binary file not shown.
Binary file removed
BIN
-135 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-Black.ttf.woff
Binary file not shown.
Binary file removed
BIN
-143 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-Bold.ttf.woff
Binary file not shown.
Binary file removed
BIN
-110 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-BoldIt.ttf.woff
Binary file not shown.
Binary file removed
BIN
-136 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-ExtraLight.ttf.woff
Binary file not shown.
Binary file removed
BIN
-110 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-It.ttf.woff
Binary file not shown.
Binary file removed
BIN
-143 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-Light.ttf.woff
Binary file not shown.
Binary file removed
BIN
-144 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-Regular.ttf.woff
Binary file not shown.
Binary file removed
BIN
-143 KB
weblate_web/static/vendor/font-source/WOFF/TTF/SourceSans3-Semibold.ttf.woff
Binary file not shown.
Binary file removed
BIN
-75.8 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceCodePro-Bold.otf.woff2
Binary file not shown.
Binary file removed
BIN
-70.1 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceCodePro-ExtraLight.otf.woff2
Binary file not shown.
Binary file removed
BIN
-62.8 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceCodePro-It.otf.woff2
Binary file not shown.
Binary file removed
BIN
-75.6 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceCodePro-Medium.otf.woff2
Binary file not shown.
Binary file removed
BIN
-75 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceCodePro-Regular.otf.woff2
Binary file not shown.
Binary file removed
BIN
-75.6 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceCodePro-Semibold.otf.woff2
Binary file not shown.
Binary file removed
BIN
-148 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-Black.otf.woff2
Binary file not shown.
Binary file removed
BIN
-156 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-Bold.otf.woff2
Binary file not shown.
Binary file removed
BIN
-122 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-BoldIt.otf.woff2
Binary file not shown.
Binary file removed
BIN
-137 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-ExtraLight.otf.woff2
Binary file not shown.
Binary file removed
BIN
-120 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-It.otf.woff2
Binary file not shown.
Binary file removed
BIN
-148 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-Light.otf.woff2
Binary file not shown.
Binary file removed
BIN
-153 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-Regular.otf.woff2
Binary file not shown.
Binary file removed
BIN
-154 KB
weblate_web/static/vendor/font-source/WOFF2/OTF/SourceSans3-Semibold.otf.woff2
Binary file not shown.
Binary file modified
BIN
+21.6 KB
(140%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceCodePro-Bold.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+19 KB
(140%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceCodePro-ExtraLight.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+16.8 KB
(140%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceCodePro-It.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+21.1 KB
(140%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceCodePro-Medium.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+21.3 KB
(140%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceCodePro-Regular.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+21.3 KB
(140%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceCodePro-Semibold.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+316 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-Black.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+132 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-Bold.ttf.woff2
Binary file not shown.
Binary file modified
BIN
-184 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-BoldIt.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+244 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-ExtraLight.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+92 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-It.ttf.woff2
Binary file not shown.
Binary file modified
BIN
-124 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-Light.ttf.woff2
Binary file not shown.
Binary file modified
BIN
-100 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-Regular.ttf.woff2
Binary file not shown.
Binary file modified
BIN
+20 Bytes
(100%)
weblate_web/static/vendor/font-source/WOFF2/TTF/SourceSans3-Semibold.ttf.woff2
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.