Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update map baselines and fix failing font download #7396

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

Merged
merged 2 commits into from
Mar 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update Gravitas font URL; raise error if download fails
  • Loading branch information
emilykl committed Mar 31, 2025
commit e67e61a7043408df3eb9270fded2118b1ad665a0
11 changes: 9 additions & 2 deletions 11 .circleci/download_google_fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@

dirOut = '.circleci/fonts/truetype/googleFonts/'

def download(repo, family, types) :
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)
if req.status_code != 200:
raise RuntimeError(f"""
Download failed.
Status code: {req.status_code}
Message: {req.reason}
"""
)
open(dirOut + name, 'wb').write(req.content)

download(
Expand Down Expand Up @@ -82,7 +89,7 @@ def download(repo, family, types) :
)

download(
'https://github.com/expo/google-fonts/blob/master/font-packages/gravitas-one/',
'https://github.com/expo/google-fonts/blob/main/font-packages/gravitas-one/400Regular/',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 🙏 Many thanks @emilykl
Switching from master to main broke these.
I suspect a similar problem would occur again.
I feel to avoid file changes (that occur on master/main branch of these repositories) it would be best to use permanent links for all these font files e.g.
https://github.com/expo/google-fonts/tree/cc65b43125023a2ad696eeec6ec10763c35ff588/font-packages/gravitas-one/400Regular instead of https://github.com/expo/google-fonts/blob/main/font-packages/gravitas-one/400Regular/.
Thank you!

'GravitasOne',
[
'_400Regular'
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.