font-directory fonts for tooltips?

Rob W's Avatar

Rob W

04 Jan, 2012 06:27 PM

Can the tooltips pull from the font-directory that carto describes?

  1. Support Staff 2 Posted by Will White on 04 Jan, 2012 06:39 PM

    Will White's Avatar

    Tooltips are rendered as HTML in your browser, so you can only use web safe fonts or fonts that are more likely to exist on all computers. You can change the font by including CSS styles in the tooltip or legend field.

  2. 3 Posted by Rob W on 04 Jan, 2012 06:48 PM

    Rob W's Avatar

    Is there a way to reference webfonts? I tried putting the css/js for them in the tooltip box, but it doesn't seem to take effect, I'm guessing that it's removed for security purposes?

  3. Support Staff 4 Posted by Tom MacWright on 09 Jan, 2012 04:53 PM

    Tom MacWright's Avatar

    Hi Rob,

    Yes, currently we restrict CSS to inline style attributes, because of attack vectors via CSS.

    This might be loosened in the future if there's a way to whitelist CSS. For the time being, the best way to pull this off would be to use Wax and the MapBox API to have direct control over your map's styling.

  4. Will White closed this discussion on 02 Mar, 2012 08:50 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

18 Jun, 2013 11:02 PM
18 Jun, 2013 10:52 PM
18 Jun, 2013 09:29 PM
18 Jun, 2013 08:59 PM
06 Jun, 2013 09:14 PM