2

I have a Cordova/Angular2 app, based on angular-cli, also using Material Design. I note that when I build I get files in my dist directory such as

roboto-v15-latin-regular.eot  
roboto-v15-latin-regular.svg  
roboto-v15-latin-regular.ttf  
roboto-v15-latin-regular.woff  
roboto-v15-latin-regular.woff2

although frankly I have no idea who is responsible for bringing these in. The problem is that even thought I have body { font-family: Roboto, sans-serif; } in my CSS, Roboto is not being applied and I get the plain old sans-serif font. I suspect that the necessary @font-face declarations may need to be brought in from somewhere, but I have no idea from where.

My question is: is there a magic CSS file somewhere with the appropriate @font-face definitions in it that I can @import from app/styles.css, for example?

Also, the fonts in the distribution seem to only be for regular weights. Since I don't know who is responsible for these fonts being included in the build in the first place, I also am puzzled about how I could bring in other versions of Roboto with different weights if I wanted to.

I have read this question but it seems overly complex and possibly out-of-date.

Community
  • 1
  • 1

0 Answers0