Home forums Using CanvasJS Custom Title Font

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Sunil Urs 3 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4899


    Is it possible to use a custom font for the title? For example one from Google Fonts?


    Sunil Urs

    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.

    Sunil Urs

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.