We’re excited to announce that custom fonts are now supported in Mapbox Studio Classic map styles and on mapbox.com. Creating a map styled to perfectly fit your needs is now easier than ever. Here are some companies that are already using custom fonts:
To add custom fonts to your own maps, add the .ttf, .woff, or .otf font files to your style’s project directory. Then create a reference to where the fonts are located by adding the following code to your stylesheet:
/* registers fonts in the style project's base directory */
Reference the fonts using their name and qualifier (Regular, Italic, Medium, etc.). Below are the fonts I used for my Halloween Map.
@feast: "Feast of Flesh BB Regular";
@horror: "AMERICAN_HORROR_STORY Medium";
@fears: "Face Your Fears Regular";
@scream: "Scream Again Regular";
@cold-night: "Cold Night for Alligators Regular";
Once you’ve added your fonts, they will appear at the top of the fonts panel.