Easily add typefaces to your Ember project in 2 easy steps.
The typefaces
project has been deprecated and it is recommended that you use fontsource instead. Please switch to using ember-fontsource to use fontsource in an Ember project.
ember install ember-typeface
- Install Ember Typeface:
ember install ember-typeface
- Pick a typeface from the list of over 800 available and add it to your project:
npm install typeface-lato --save-dev
That’s it!
You are now free to use font-family: "Lato"
in your application’s styles.
Ember Typeface will try to look through your node_modules
to discover typeface packages. If typefaces are specified in the config options in your app’s evironment: ENV.typefaceOptions.typefaces
the two lists will be merged for unique values. However, you can choose to disable this auto discovery and configure which typefaces are imported into your project.
// config/environment.js
module.exports = function(environment) {
let ENV = {
...
typefaceOptions: {
disableAuto: true, // default is false, disable to manually choose typefaces
typefaces: [
'lato'
]
}
};
};
ember typeface:active
– view a list of the typefaces to be included in the appember typeface:list
– view a list of all the available typefacesember typeface:search <name>
– perform a fuzzy search on the list of typefaces
To see an example of an Ember app configured with a typeface check out: https://github.com/jeffjewiss/ember-typeface-example