SaurabhLP
SaurabhLP

Reputation: 3657

How to disable Google Fonts from Google Charts?

I am working with Google Charts and customizing design for making it more beautiful.

But on embedding font faces in the Google Charts, I am getting an error within the Firebug console, which I am unable to understand. Firebug shows this error:

"NetworkError: 400 Bad Request - http://fonts.googleapis.com/css?family=hand_of_seanregular%7CInterstateRegular%7CInterstateRegular%7CInterstateRegular%7CInterstateRegular"

Good news is that the font is visible. From the error I think it's forcing the font to be a Google font but I am using a font face.

What I am writing is this:

textStyle : { 
    color: '#fff',
    fontName: "InterstateRegular",
    fontSize: 16,
    bold: false,
},

Could anyone tell me what mistake I am doing?

Upvotes: 4

Views: 981

Answers (1)

user2676922
user2676922

Reputation: 11

webfont.js seems to call insertBefore() which in turn loads a Google Font. So the solution is to override the default insertBefore() function, look for href string that matches the one giving you an error and then return early - otherwise call the default insertBefore()

Code here: Google Maps v3 - prevent API from loading Roboto font

Upvotes: 1

Related Questions