-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Switch geodata providers #7393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e8d763d
7f7b690
6b596c0
353bf94
fc6022f
2910eea
5d66dad
3b47c67
b434656
a4d0b21
e257b7b
1154ff1
86d5b00
86f048c
ac61095
f4c3d48
22a8e0a
247f925
3cf9730
24e8558
b2ae532
85ad69c
b903b9f
e74c65c
33a2e00
4868250
bce8d21
da44084
69f104e
c684b72
362233a
4d37b8c
bb8377b
6356355
5482adf
2710e7c
b8bfea6
d6ea8ab
3ec56ab
79017d5
0f9049c
4a6fb9d
33d3425
c74f711
f7cdc5f
9711ef7
51a596e
40968da
5e7efc8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,82 @@ | ||
import os | ||
|
||
import requests | ||
|
||
dirOut = '.circleci/fonts/truetype/googleFonts/' | ||
dir_out = ".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) | ||
def download(repo, family, types, overwrite=True): | ||
for t in types: | ||
name = family + t + ".ttf" | ||
url = repo + name + "?raw=true" | ||
out_file = dir_out + name | ||
print("Getting: ", url) | ||
if os.path.exists(out_file) and not overwrite: | ||
print(" => Already exists: ", out_file) | ||
continue | ||
req = requests.get(url, allow_redirects=False) | ||
if req.status_code != 200: | ||
# If we get a redirect, print an error so that we know to update the URL | ||
if req.status_code == 302 or req.status_code == 301: | ||
new_url = req.headers.get("Location") | ||
print(f" => Redirected -- please update URL to: {new_url}") | ||
raise RuntimeError(f""" | ||
Download failed. | ||
Status code: {req.status_code} | ||
Message: {req.reason} | ||
""" | ||
) | ||
open(dirOut + name, 'wb').write(req.content) | ||
""") | ||
open(out_file, "wb").write(req.content) | ||
|
||
|
||
download( | ||
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSansMono/', | ||
'NotoSansMono', | ||
[ | ||
'-Regular', | ||
'-Bold' | ||
] | ||
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSansMono/hinted/ttf/", | ||
"NotoSansMono", | ||
["-Regular", "-Bold"], | ||
) | ||
|
||
download( | ||
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSans/', | ||
'NotoSans', | ||
[ | ||
'-Regular', | ||
'-Italic', | ||
'-Bold' | ||
] | ||
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSans/hinted/ttf/", | ||
"NotoSans", | ||
["-Regular", "-Italic", "-Bold"], | ||
) | ||
|
||
download( | ||
'https://github.com/googlefonts/noto-fonts/blob/main/hinted/ttf/NotoSerif/', | ||
'NotoSerif', | ||
"https://cdn.jsdelivr.net/gh/notofonts/notofonts.github.io/fonts/NotoSerif/hinted/ttf/", | ||
"NotoSerif", | ||
[ | ||
'-Regular', | ||
'-Italic', | ||
'-Bold', | ||
'-BoldItalic', | ||
] | ||
"-Regular", | ||
"-Italic", | ||
"-Bold", | ||
"-BoldItalic", | ||
], | ||
) | ||
|
||
download( | ||
'https://github.com/google/fonts/blob/main/ofl/oldstandardtt/', | ||
'OldStandard', | ||
[ | ||
'-Regular', | ||
'-Italic', | ||
'-Bold' | ||
] | ||
"https://raw.githubusercontent.com/google/fonts/refs/heads/main/ofl/oldstandardtt/", | ||
"OldStandard", | ||
["-Regular", "-Italic", "-Bold"], | ||
) | ||
|
||
download( | ||
'https://github.com/google/fonts/blob/main/ofl/ptsansnarrow/', | ||
'PT_Sans-Narrow-Web', | ||
[ | ||
'-Regular', | ||
'-Bold' | ||
] | ||
"https://raw.githubusercontent.com/google/fonts/refs/heads/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' | ||
] | ||
"https://raw.githubusercontent.com/impallari/Raleway/refs/heads/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' | ||
] | ||
"https://raw.githubusercontent.com/googlefonts/roboto-2/refs/heads/main/src/hinted/", | ||
"Roboto", | ||
["-Regular", "-Italic", "-Bold", "-BoldItalic"], | ||
) | ||
|
||
download( | ||
'https://github.com/expo/google-fonts/blob/main/font-packages/gravitas-one/400Regular/', | ||
'GravitasOne', | ||
[ | ||
'_400Regular' | ||
] | ||
"https://raw.githubusercontent.com/expo/google-fonts/refs/heads/main/font-packages/gravitas-one/400Regular/", | ||
"GravitasOne", | ||
["_400Regular"], | ||
) |
This file was deleted.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"type":"Topology","arcs":[[[1150,2241],[-5,39],[8,15],[1,-28],[2,39],[-7,24],[6,-22],[-9,-25],[-9,71],[8,19],[-6,-12],[-6,38],[2,14]],[[1199,2413],[-7,-34]],[[1192,2379],[-1,-68],[8,-42],[-25,-21],[-5,-70],[-13,30],[6,10],[1,-17],[7,37],[-4,21],[-16,-18]],[[1197,2253],[3,-12],[11,-72],[24,-37],[-38,-14],[-36,23],[19,-3],[-7,26],[20,-21],[-12,39],[8,28],[-9,-7],[-2,25],[19,25]],[[1200,2111],[-7,-3],[8,-14],[2,-26],[-19,31],[2,9],[14,3]],[[1151,2199],[5,-31],[-12,20],[7,11]],[[1140,2231],[9,-20],[-18,35],[9,-15]],[[1150,2241],[17,3],[-12,-17],[4,-7],[-4,-2],[1,-19],[-6,42]],[[1133,2413],[0,-4]],[[1133,2409],[0,4]],[[1302,2335],[12,-21],[-17,-43],[5,64]],[[1297,2332],[-11,-50],[-5,4],[7,21],[-4,19],[13,6]],[[118,320],[86,-48],[253,26],[-157,47],[-32,154],[18,31],[88,31],[-133,116],[-3,99],[91,-41],[42,44],[-43,38],[11,19],[30,-21],[-3,34],[112,87],[16,-22],[175,35],[27,-14],[14,40],[13,-59],[15,37],[51,-35],[-1,-30],[19,36],[49,-26],[-21,93],[25,15],[-29,-4],[-5,36],[76,-32],[18,26],[38,-24],[19,42],[78,-80],[17,55],[37,-51],[81,41],[17,18],[8,61],[-18,142],[20,27],[-8,120],[11,-11],[-1,37],[30,98],[71,108],[4,-26],[-13,0],[-8,-52],[-13,6],[-22,-51],[-4,-40],[19,-1],[-4,-20],[-20,3],[1,-25],[-9,27],[-18,-71],[4,-78],[21,12],[-10,-13],[27,-110],[7,-75],[-13,-15],[12,-1],[-7,-31],[17,-43],[-9,-69],[-39,-53],[12,-9],[-71,-62],[24,-27],[-15,-72],[-55,19],[-17,68],[-56,-20],[-5,-30],[-20,19],[22,-137],[9,-19],[0,26],[18,-9],[15,-32],[-29,1],[49,-38],[63,-7],[103,33],[125,148],[37,-48],[-38,-25],[46,5],[-25,-27],[38,-5],[0,-32],[-81,-50],[-46,45],[-64,-63],[-118,-25],[42,-58],[82,-1],[19,-35],[79,74],[87,15],[90,80],[42,-13],[8,69],[-69,27],[14,61],[133,192],[118,132],[-6,66],[15,-18],[7,44],[19,-54],[16,68],[12,-1],[-1,-43],[31,9],[1,59],[8,-69],[19,-15],[47,83],[50,8],[34,-27],[53,25],[70,-19],[109,52],[5,64],[56,-80],[11,63],[30,46],[40,49],[14,-24],[18,25],[-11,20],[27,-11],[-6,43],[18,28],[34,4],[37,-88],[120,-25],[0,-89],[-13,-3],[-6,-59],[36,-71],[25,99],[47,42],[15,60],[54,63],[79,36],[74,0],[-1,44],[22,22],[-4,-46],[50,5],[41,-52],[47,74],[48,-77],[40,-4],[51,47],[34,-46],[2,65],[50,-16],[8,56],[16,-64],[82,-45],[26,15],[-13,-46],[35,-13],[-6,-35],[33,5],[4,-25],[27,24],[11,-42],[45,-22],[21,-55],[61,-21],[40,-51],[-17,-121],[-66,-82],[21,-34],[-20,-3],[-6,-41],[11,-131],[22,16],[20,-39],[-33,4],[-43,-64],[39,-153],[-27,-10],[38,-1],[32,-65]],[[3738,392],[132,-56],[0,-276],[0,-60],[-3870,0],[0,6],[0,330],[118,-16]],[[212,609],[-41,32],[8,36],[39,-38],[-6,-30]],[[1190,652],[1,29],[36,20],[-37,-49]],[[3730,761],[25,-10],[-27,-13],[2,23]],[[1117,736],[-15,-24],[-35,27],[35,43],[15,-46]],[[682,956],[-13,-1],[19,20],[-6,-19]],[[643,983],[17,-6],[-14,-25],[-29,-1],[-1,38],[27,-6]],[[590,1009],[17,-51],[-34,34],[1,27],[16,-10]],[[1134,987],[-17,20],[5,29],[14,-10],[-2,-39]],[[878,1085],[22,15],[-9,-22],[18,-12],[-75,13],[39,5],[0,24],[5,-23]],[[1133,1157],[-10,5],[17,12],[-7,-17]],[[1189,1231],[11,-152],[-39,-35],[-4,24],[19,4],[-13,36],[-19,-32],[-23,45],[24,-8],[-7,22],[37,14],[-9,38],[16,6],[-20,28],[-3,42],[19,17],[11,-49]],[[1204,1364],[-10,-21],[12,67],[-2,-46]],[[1314,1574],[7,-15],[-9,-16],[2,31]],[[1133,2409],[0,4],[2,0]],[[1192,2379],[7,34],[2671,0],[0,-2077],[-132,56]],[[118,320],[-118,16],[0,2077],[1133,0],[0,-4]]],"transform":{"scale":[0.09302325581395349,0.016576875259013676],"translate":[-180,-90]},"objects":{"coastlines":{"type":"GeometryCollection","geometries":[{"type":"MultiLineString","arcs":[[0],[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]]}]},"countries":{"type":"GeometryCollection","geometries":[{"arcs":[[[12,13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]]],"type":"MultiPolygon","properties":{"ct":[21.35,-80.45]},"id":"ATA"}]},"lakes":{"type":"GeometryCollection","geometries":[]},"land":{"type":"GeometryCollection","geometries":[{"arcs":[[[12,13]],[[14]],[[15]],[[16]],[[17]],[[18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]]],"type":"MultiPolygon"}]},"ocean":{"type":"GeometryCollection","geometries":[{"arcs":[[27,-1,-8,-3,28,-13,29],[-17],[-4],[-5],[-15],[-19],[-20],[-16],[-18],[-21],[-23],[-24],[-25],[-22],[-11],[-27],[-26],[-6],[-7],[-12]],"type":"Polygon"}]},"rivers":{"type":"GeometryCollection","geometries":[]},"subunits":{"type":"GeometryCollection","geometries":[]}}} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.