forked from plotly/plotly.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdownload_google_fonts.py
90 lines (80 loc) · 1.69 KB
/
download_google_fonts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import requests
dirOut = '.circleci/fonts/truetype/googleFonts/'
def download(repo, family, types) :
for t in types :
name = family + t + '.ttf'
url = repo + name + '?raw=true'
print(url)
req = requests.get(url, allow_redirects=True)
open(dirOut + name, 'wb').write(req.content)
download(
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/',
'NotoSansMono',
[
'-Regular',
'-Bold'
]
)
download(
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSans/',
'NotoSans',
[
'-Regular',
'-Italic',
'-Bold'
]
)
download(
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSerif/',
'NotoSerif',
[
'-Regular',
'-Italic',
'-Bold',
'-BoldItalic',
]
)
download(
'https://github.com/google/fonts/blob/main/ofl/oldstandardtt/',
'OldStandard',
[
'-Regular',
'-Italic',
'-Bold'
]
)
download(
'https://github.com/google/fonts/blob/main/ofl/ptsansnarrow/',
'PT_Sans-Narrow-Web',
[
'-Regular',
'-Bold'
]
)
download(
'https://github.com/impallari/Raleway/blob/master/fonts/v3.000%20Fontlab/TTF/',
'Raleway',
[
'-Regular',
'-Regular-Italic',
'-Bold',
'-Bold-Italic'
]
)
download(
'https://github.com/googlefonts/roboto/blob/main/src/hinted/',
'Roboto',
[
'-Regular',
'-Italic',
'-Bold',
'-BoldItalic'
]
)
download(
'https://github.com/expo/google-fonts/blob/master/font-packages/gravitas-one/',
'GravitasOne',
[
'_400Regular'
]
)