Easily add fontsources to your Ember project in 2 easy steps.
This Ember addon is adapted from ember-typeface
ember install ember-fontsource
- Install Ember Fontsource:
ember install ember-fontsource
- 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.
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'
]
}
};
};
ember fontsource:active
– view a list of the fontsources to be included in the appember fontsource:list
– view a list of all the available fontsourcesember fontsource:search <name>
– perform a fuzzy search on the list of fontsources