Quantcast
Channel: maps for developers - Medium
Viewing all articles
Browse latest Browse all 2230

Custom font support added to Mapbox Studio

$
0
0

We’re excited to announce that custom fonts are now supported in Mapbox Studio 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:

Financial Times

Pinterest

Battlefield

WSJ

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:

Map {
    /* registers fonts in the style project's base directory */
    font-directory: url('');
}

Reference the fonts using their name and qualifier (Regular, Italic, Medium, etc.). Below are the fonts I used for my Halloween Map.

//Halloween Fonts
@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.

your fonts

If you haven’t tried Mapbox Studio out yet, download the latest version - it’s open source and publishing your map on Mapbox.com is free.


Viewing all articles
Browse latest Browse all 2230

Trending Articles