neverpanic / google-font-download

Locally host Google's web fonts
https://neverpanic.de/blog/2014/03/19/downloading-google-web-fonts-for-local-hosting/
BSD 2-Clause "Simplified" License
706 stars 72 forks source link

Allow local font names to be missing #25

Closed dpeukert closed 4 years ago

dpeukert commented 4 years ago

From what I can tell, some fonts now don't provide local font names:

http GET 'https://fonts.googleapis.com/css?family=Lora&subset=latin'

# HTTP/1.1 200 OK
# 
# @font-face {
#   font-family: 'Lora';
#   font-style: normal;
#   font-weight: 400;
#   src: url(https://fonts.gstatic.com/s/lora/v15/0QI6MX1D_JOuGQbT0gvTJPa787weuxJBkqg.ttf) format('truetype');
# }

This PR changes the logic to no longer throw an error when a local font name is missing and also adds an gitignore file.

dpeukert commented 4 years ago

Travis failure is unrelated (and fixed in #26).

neverpanic commented 4 years ago

Thanks!