Forum Discussion

powerkriya's avatar
powerkriya
Frequent Visitor
6 years ago
Solved

Custom font for Custom Visual

How to add Helvetica font to the custom visual fontFamily custom properties?
  • dm-p's avatar
    dm-p
    6 years ago

    I can't easily diagnose the issues you're experiencing with installed fonts for Desktop vs. Service - this might vary from browser to browser, and it's possible that your browser might only load font lists on startup, so if you've not tried it, it might be worth killing all sessions, installing the font and the re-open your borwser and load the visualto see if it works.

    I personally think that if you're relying on a font that a user may or may not have installed on their own system, you'll get inconsistent results anyway, so you can either handle this with a fallback font, or use the @font-face approach so that all end-users get a consistent experience.

    This custom visual has a particularly stylised font that most people definitely won't have installed, and uses the CDN approach (you can see it in the style declarations). It has been tested in both Desktop and the Service and works fine - another user even did a data story with it, or you could refer to the sample workbook (which are both hosted via publish to web) to see how the fonts come out for you in your browser. Hopefully this might help you out.

    Regards,

    Daniel