1.0.0 • Published 3 years ago

ember-fontsource v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

Background

This Ember addon is adapted from https://github.com/jeffjewiss/ember-typeface

Installation

ember install ember-fontsource

Usage

  1. Install Ember Typeface: 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 Typeface 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