Skip to content

Easily add typefaces to your Ember projects

License

Notifications You must be signed in to change notification settings

mwhitworth/ember-fontsource

 
 

Repository files navigation

Ember Fontsource

Build Status npm version Monthly Downloads Ember Observer Score

Easily add fontsources to your Ember project in 2 easy steps.




Background

This Ember addon is adapted from ember-typeface

Installation

ember install ember-fontsource

Usage

  1. Install Ember Fontsource: ember install ember-fontsource
  2. Pick a fontsource from the list of over 800 available and add it to your project: npm install fontsource-lato --save-dev

That’s it!

You are now free to use font-family: "Lato" in your application’s styles.

Advanced Usage

Ember Fontsource will try to look through your node_modules to discover fontsource packages. If fontsources are specified in the config options in your app’s evironment: ENV.fontsourceOptions.fontsources the two lists will be merged for unique values. However, you can choose to disable this auto discovery and configure which fontsources are imported into your project.

// config/environment.js
module.exports = function(environment) {
  let ENV = {
    ...

    fontsourceOptions: {
      disableAuto: true, // default is false, disable to manually choose fontsources
      fontsources: [
        'lato'
      ]
    }
  };
};

Commands

  • ember fontsource:active – view a list of the fontsources to be included in the app
  • ember fontsource:list – view a list of all the available fontsources
  • ember fontsource:search <name> – perform a fuzzy search on the list of fontsources

About

Easily add typefaces to your Ember projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 93.1%
  • HTML 6.5%
  • Other 0.4%