I am trying to use google fonts in my web application. My call to load google fonts is :
$.get("https://www.googleapis.com/webfonts/v1/webfonts?key=xxxxxxx", function (result) {
var data = {};
console.log(result);
console.log($.parseJSON(result));
data.items = $.parseJSON(result).items;
});
The above call gives following result in my 3 target browsers :
Firefox
console.log(result); ========> JSON string
console.log($.parseJSON(result)); ========> Successfully parsed the json string
data.items = $.parseJSON(result).items; ===> contains all google fonts
IE (9)
$.get callback is not executing.
Chrome
console.log(result); ========> Object
console.log($.parseJSON(result)); ========> null
Can anybody please tell me the generalized way to use google fonts on all above 3 mentioned browser?