Roboto font
The downloaded Roboto fonts with matching @font-face
declarations in CSS.
Each font-family has a library-definition, so you can control which variations to include in your theme.
1) Add the libraries that you want to use in your theme's compony.info.yml
file:
libraries:
- compony/global
- compony/font--roboto--black-italic
- compony/font--roboto--black
- compony/font--roboto--bold-italic
- compony/font--roboto--bold
- compony/font--roboto--italic
- compony/font--roboto--light-italic
- compony/font--roboto--light
- compony/font--roboto--medium-italic
- compony/font--roboto--medium
- compony/font--roboto--regular
- compony/font--roboto--thin-italic
- compony/font--roboto--thin
(Only include the library definitions of the fonts that you need)
2) Use it in your CSS as follows:
font-family: 'roboto--black-italic';
All the fonts are named using the BEM-naming structure.
Specifications
Machine name
font--roboto
Building blocks
CSS