How is one supposed to load google fonts, Do I really have to download and package every font I use with my app? I'm trying to avoid packaging the fonts since they are so many that my app would be huge (it's a web editor)
<link href='http://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' type='text/css'>
> Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=Nunito' because it violates the following Content Security Policy directive: "style-src 'self' data: chrome-extension-resource: 'unsafe-inline'".
I thought I could load it as a blob but I'm not sure if it can be done. The data is downloaded but there are no changes, I have tried this:
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://themes.googleusercontent.com/static/fonts/nunito/v4/0rdItLTcOd8TSMl72RUU5w.woff", true);
xhr.responseType = "blob";
xhr.onreadystatechange = function() {
console.log("STATE", xhr.readyState);
if (xhr.readyState == 4) {
var myfontblob = window.webkitURL.createObjectURL(xhr.response);
$("<style>").text("@font-face {\
font-family: 'Nunito';\
font-style: normal;\
font-weight: 400;\
src: '"+myfontblob+"' format('woff');\
}").prependTo("head");
}
};
xhr.send();