boundlessgeo/mapbox-to-css-font

Name: mapbox-to-css-font

Owner: Boundless

Description: Utility to convert Mapbox GL Style font names to CSS font definitions

Created: 2016-09-30 09:26:41.0

Updated: 2016-09-30 09:27:33.0

Pushed: 2017-11-24 16:59:54.0

Homepage: null

Size: 7

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Mapbox to CSS Font

Utility to convert Mapbox GL Style font names to CSS compatible font definitions.

The “Klokantech Noto Sans” font is recognized and returned as “Noto Sans”, so it can be loaded as web font from Google fonts.

Usage
parseFont = require('mapbox-to-css-font');
eFont('Open Sans Regular', 16);
eturns 'normal 400 16px "Open Sans"'
API

Parameters

Returns string CSS font definition, e.g. 'normal 400 16px "Open Sans"'.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.