cssfontsminify

How to Minify the Google font CSS


I have the following Google font CSS files:

Not Minified CSS Files:

https://fonts.googleapis.com/css?family=Open+Sans:400,600,600i,700
https://fonts.googleapis.com/css?family=Raleway:400,400i,500,600,600i,700,800

How can I minify them?


Solution

  • You can't, because those CSS files are served from google, not from your own domain (nor can they be according to google fonts ToS).

    Really want to save your users' bandwidth/ms: use a single HTTP request:

    https://fonts.googleapis.com/css?family=Open+Sans:400,600,600i,700|Raleway:400,400i,500,600,600i,700,800

    Really really want to save your users' bandwidth? Use less font variations.

    If you try to serve the file yourself, there's no guarantee that google will keep the font files at the URLs specified in the CSS files you have downloaded:

    https://fonts.gstatic.com/s/raleway/v11/YZaO6llzOP57DpTBv2GnyFKPGs1ZzpMvnHX-7fPOuAc.woff2
    

    Doesn't look like a reliably stable URL to me.