Home › forums › Using CanvasJS › Custom Title Font
Tagged: font, title
Is it possible to use a custom font for the title? For example one from Google Fonts?
I was able to use Custom Google Fonts inside the Chart. Checkout the fiddle.
There are couple of things to remember though.
1. Most Browsers “start downloading” font at the point where they are used. Hence text gets rendered in regular font first and then it updates once the download completes. Checkout Paul Irish’s Blog on the same.
2. As far as I know there is no proper way to preload the fonts. Only thing that we can do is to reduce the delay or flicker due to update.
3. Remember to add a white space (with the required font) at the beginning of the document to start downloading the font at the earliest.
4. Better to render the chart with a delay of 500 ms to 1sec. This pretty much eliminates the flicker due to update in font style.
You must be logged in to reply to this topic.