font-directory fonts for tooltips?
Can the tooltips pull from the font-directory that carto describes?
Comments are currently closed for this discussion. You can start a new one.
Can the tooltips pull from the font-directory that carto describes?
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Will White on 04 Jan, 2012 06:39 PM
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.
3 Posted by Rob W on 04 Jan, 2012 06:48 PM
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?
Support Staff 4 Posted by Tom MacWright on 09 Jan, 2012 04:53 PM
Hi Rob,
Yes, currently we restrict CSS to inline
styleattributes, 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.
Will White closed this discussion on 02 Mar, 2012 08:50 PM.