File tree Expand file tree Collapse file tree 2 files changed +29
-16
lines changed Expand file tree Collapse file tree 2 files changed +29
-16
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ jobs:
102
102
name : install NotoSansCJK fonts
103
103
command : sudo apt install fonts-noto-cjk
104
104
- run :
105
- name : download google fonts e.g. Raleway
105
+ name : download google fonts e.g. Raleway, Roboto
106
106
command : python3 ./.circleci/download_google_fonts.py
107
107
- run :
108
108
name : install all google fonts
Original file line number Diff line number Diff line change 1
1
import requests
2
2
3
- dirOut = '.circleci/fonts/truetype/googleFonts'
3
+ dirOut = '.circleci/fonts/truetype/googleFonts/ '
4
4
5
- family = 'Raleway'
6
- repo = 'https://github.com/impallari/' + family + '/blob/master/fonts/v3.000%20Fontlab/TTF/'
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 )
7
12
8
- types = [
9
- '-Regular' ,
10
- '-Regular-Italic' ,
11
- '-Bold' ,
12
- '-Bold-Italic'
13
- ]
13
+ download (
14
+ 'https://github.com/impallari/Raleway/blob/master/fonts/v3.000%20Fontlab/TTF/' ,
15
+ 'Raleway' ,
16
+ [
17
+ '-Regular' ,
18
+ '-Regular-Italic' ,
19
+ '-Bold' ,
20
+ '-Bold-Italic'
21
+ ]
22
+ )
14
23
15
- for t in types :
16
- name = family + t + '.ttf'
17
- url = repo + name + '?raw=true'
18
- print (url )
19
- req = requests .get (url , allow_redirects = True )
20
- open (dirOut + name , 'wb' ).write (req .content )
24
+ download (
25
+ 'https://github.com/googlefonts/roboto/blob/main/src/hinted/' ,
26
+ 'Roboto' ,
27
+ [
28
+ '-Regular' ,
29
+ '-Italic' ,
30
+ '-Bold' ,
31
+ '-BoldItalic'
32
+ ]
33
+ )
You can’t perform that action at this time.
0 commit comments