Dynamically load google fonts after page has loaded

Check out the WebFont.load command in this github repo: https://github.com/typekit/webfontloader You can load whatever font you want dynamically: <script src=”http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js”></script> <script> WebFont.load({ google: { families: [‘Droid Sans’, ‘Droid Serif’] } }); </script>

How can I use the font family ‘Lato’ in my project? [closed]

Please put this code in head section <link href=”https://fonts.googleapis.com/css?family=Lato:400,700″ rel=”stylesheet” type=”text/css”> and use font-family: ‘Lato’, sans-serif; in your css. For example: h1 { font-family: ‘Lato’, sans-serif; font-weight: 400; } Or you can use manually also Generate .ttf font from fontSquiral and can try this option @font-face { font-family: “Lato”; src: url(‘698242188-Lato-Bla.eot’); src: url(‘698242188-Lato-Bla.eot?#iefix’) format(’embedded-opentype’), url(‘698242188-Lato-Bla.svg#Lato … Read more

How can I only use Latin subset with Google Fonts WOFF2 files?

The trick lies with this optimization: unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; With this, the browser knows whether it needs to download the font, depending on the characters it just loaded in the html. Chrome is currently the only one with full support for this. MDN lists Firefox 36+ as completely ignoring this spec, therefore Google … Read more

Google Font not working on Safari

Your CSS should not only contain font-family: ‘Source Sans Pro’, sans-serif; it should also have values for FONT-STYLE and FONT-WEIGHT: font-family: ‘Source Sans Pro’, sans-serif; font-weight: 900; font-style: italic; in case you use a font that contains those values like for example: https://fonts.googleapis.com/css?family=Source+Sans+Pro:900italic

Load Google Font with asynchronously or deferred without Font Face Observer

You can load the web fonts asynchronously with this script: <script> WebFontConfig = { typekit: { id: ‘xxxxxx’ } }; (function(d) { var wf = d.createElement(‘script’), s = d.scripts[0]; wf.src=”https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js”; wf.async = true; s.parentNode.insertBefore(wf, s); })(document); </script> You’ll need this library, it’s pretty easy to implement. I’ve learn this from a course I took recently, … Read more

How to use font-family lato? [closed]

Please put this code in head section <link href=”http://fonts.googleapis.com/css?family=Lato:400,700″ rel=”stylesheet” type=”text/css”> and use font-family: ‘Lato’, sans-serif; in your css. For example: h1 { font-family: ‘Lato’, sans-serif; font-weight: 400; } Or you can use manually also Generate .ttf font from fontSquiral and can try this option @font-face { font-family: “Lato”; src: url(‘698242188-Lato-Bla.eot’); src: url(‘698242188-Lato-Bla.eot?#iefix’) format(’embedded-opentype’), url(‘698242188-Lato-Bla.svg#Lato … Read more

Google Fonts violates Content Security Policy

There are two things to fix here: Use https for the Google fonts link (https://fonts.googleapis.com/css?family=Whatever) Authorize https://fonts.googleapis.com in style-src directive and https://fonts.gstatic.com in font-src directive: “style-src ‘self’ https://fonts.googleapis.com; font-src ‘self’ https://fonts.gstatic.com”

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)