Open Sans font
The downloaded Open Sans 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--open-sans--bold
- compony/font--open-sans--bold-italic
- compony/font--open-sans--extra-bold
- compony/font--open-sans--extra-bold-italic
- compony/font--open-sans--italic
- compony/font--open-sans--light
- compony/font--open-sans--light-italic
- compony/font--open-sans--regular
- compony/font--open-sans--semi-bold
- compony/font--open-sans--semi-bold-italic
(Only include the library definitions of the fonts that you need)
2) Use it in your CSS as follows:
font-family: 'open-sans--bold';
All the fonts are named using the BEM-naming structure.
Specifications
Machine name
font--open-sans
Building blocks
CSS