JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 211919
  • Score
    100M100P100Q183685F
  • License BSD-2-Clause

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

Package Exports

  • mapbox-to-css-font

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mapbox-to-css-font) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Mapbox to CSS Font

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

Usage

var parseFont = require('mapbox-to-css-font');
parseFont('Open Sans Regular', 16);
// returns 'normal 400 16px Open Sans'

API

Parameters

  • font string Mapbox GL Style font name, e.g. 'Open Sans Regular'.

  • size number Font size in pixels.

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