Skip to content

Commit d234487

Browse files
committed
Merge remote-tracking branch 'origin/master' into pr/7067
2 parents 6b6daee + 322c251 commit d234487

File tree

1,912 files changed

+2952232
-2960106
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,912 files changed

+2952232
-2960106
lines changed

.circleci/config.yml

Lines changed: 112 additions & 109 deletions
Large diffs are not rendered by default.

.circleci/download_google_fonts.py

Lines changed: 54 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,82 @@
1+
import os
2+
13
import requests
24

3-
dirOut = '.circleci/fonts/truetype/googleFonts/'
5+
dir_out = ".circleci/fonts/truetype/googleFonts/"
6+
7+
8+
def download(repo, family, types, overwrite=True):
9+
for t in types:
10+
name = family + t + ".ttf"
11+
url = repo + name + "?raw=true"
12+
out_file = dir_out + name
13+
print("Getting: ", url)
14+
if os.path.exists(out_file) and not overwrite:
15+
print(" => Already exists: ", out_file)
16+
continue
17+
req = requests.get(url, allow_redirects=False)
18+
if req.status_code != 200:
19+
# If we get a redirect, print an error so that we know to update the URL
20+
if req.status_code == 302 or req.status_code == 301:
21+
new_url = req.headers.get("Location")
22+
print(f" => Redirected -- please update URL to: {new_url}")
23+
raise RuntimeError(f"""
24+
Download failed.
25+
Status code: {req.status_code}
26+
Message: {req.reason}
27+
""")
28+
open(out_file, "wb").write(req.content)
429

5-
def download(repo, family, types) :
6-
for t in types :
7-
name = family + t + '.ttf'
8-
url = repo + name + '?raw=true'
9-
print(url)
10-
req = requests.get(url, allow_redirects=True)
11-
open(dirOut + name, 'wb').write(req.content)
1230

1331
download(
14-
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/',
15-
'NotoSansMono',
16-
[
17-
'-Regular',
18-
'-Bold'
19-
]
32+
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMono/hinted/ttf/",
33+
"NotoSansMono",
34+
["-Regular", "-Bold"],
2035
)
2136

2237
download(
23-
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSans/',
24-
'NotoSans',
25-
[
26-
'-Regular',
27-
'-Italic',
28-
'-Bold'
29-
]
38+
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSans/hinted/ttf/",
39+
"NotoSans",
40+
["-Regular", "-Italic", "-Bold"],
3041
)
3142

3243
download(
33-
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSerif/',
34-
'NotoSerif',
44+
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSerif/hinted/ttf/",
45+
"NotoSerif",
3546
[
36-
'-Regular',
37-
'-Italic',
38-
'-Bold',
39-
'-BoldItalic',
40-
]
47+
"-Regular",
48+
"-Italic",
49+
"-Bold",
50+
"-BoldItalic",
51+
],
4152
)
4253

4354
download(
44-
'https://github.com/google/fonts/blob/main/ofl/oldstandardtt/',
45-
'OldStandard',
46-
[
47-
'-Regular',
48-
'-Italic',
49-
'-Bold'
50-
]
55+
"https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/oldstandardtt/",
56+
"OldStandard",
57+
["-Regular", "-Italic", "-Bold"],
5158
)
5259

5360
download(
54-
'https://github.com/google/fonts/blob/main/ofl/ptsansnarrow/',
55-
'PT_Sans-Narrow-Web',
56-
[
57-
'-Regular',
58-
'-Bold'
59-
]
61+
"https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/ptsansnarrow/",
62+
"PT_Sans-Narrow-Web",
63+
["-Regular", "-Bold"],
6064
)
6165

6266
download(
63-
'https://github.com/impallari/Raleway/blob/master/fonts/v3.000%20Fontlab/TTF/',
64-
'Raleway',
65-
[
66-
'-Regular',
67-
'-Regular-Italic',
68-
'-Bold',
69-
'-Bold-Italic'
70-
]
67+
"https://raw.githubusercontent.com/impallari/Raleway/refs/heads/master/fonts/v3.000%20Fontlab/TTF/",
68+
"Raleway",
69+
["-Regular", "-Regular-Italic", "-Bold", "-Bold-Italic"],
7170
)
7271

7372
download(
74-
'https://github.com/googlefonts/roboto/blob/main/src/hinted/',
75-
'Roboto',
76-
[
77-
'-Regular',
78-
'-Italic',
79-
'-Bold',
80-
'-BoldItalic'
81-
]
73+
"https://raw.githubusercontent.com/googlefonts/roboto-2/refs/heads/main/src/hinted/",
74+
"Roboto",
75+
["-Regular", "-Italic", "-Bold", "-BoldItalic"],
8276
)
8377

8478
download(
85-
'https://github.com/expo/google-fonts/blob/master/font-packages/gravitas-one/',
86-
'GravitasOne',
87-
[
88-
'_400Regular'
89-
]
79+
"https://raw.githubusercontent.com/expo/google-fonts/refs/heads/main/font-packages/gravitas-one/400Regular/",
80+
"GravitasOne",
81+
["_400Regular"],
9082
)

.circleci/env_image.sh

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
#!/bin/sh
2+
set -e
23
# install required fonts
3-
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji && \
4-
sudo python3 .circleci/download_google_fonts.py && \
5-
sudo cp -r .circleci/fonts/ /usr/share/ && \
6-
sudo fc-cache -f && \
4+
sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji
5+
6+
# install pip
7+
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
8+
sudo python3 get-pip.py
9+
10+
# install additional fonts
11+
sudo python3 -m pip install requests
12+
sudo python3 .circleci/download_google_fonts.py
13+
sudo cp -r .circleci/fonts/ /usr/share/
14+
sudo apt install fontconfig
15+
sudo fc-cache -f
16+
717
# install kaleido & plotly
8-
sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off
18+
sudo python3 -m pip install kaleido==0.2.1 plotly==6.2.0 --progress-bar off
19+
920
# install numpy i.e. to convert arrays to typed arrays
1021
sudo python3 -m pip install numpy==1.24.2

.circleci/fonts/truetype/googleFonts/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.
37.7 KB
Binary file not shown.
617 KB
Binary file not shown.
624 KB
Binary file not shown.
607 KB
Binary file not shown.
597 KB
Binary file not shown.
582 KB
Binary file not shown.

0 commit comments

Comments
 (0)