Topic: Override base font with MyFonts [Angular Pro]

jim-jwmmgmail-com pro asked 6 years ago


Hello, I'm trying to override the base font family (Roboto) with my own MyFonts kit. Where is the correct place to in the MDB Pro project structure to do this? Keeping webfonts folder and css in the root, and linking to them within the Index file is not overriding Roboto so far. Please let me know. Thanks,   Jim W.

Damian Gemza staff answered 6 years ago


Dear Jim, If you want to use online fonts, to your styles.scss file please add this code:
@import url('https://fonts.googleapis.com/css?family=Slabo+27px');

* {

font-family: 'Slabo 27px', serif;

}
If you want to use fonts from your drive, please place your fonts in src/assets folder and add this code to your styles.scss file:
@font-face { font-family: "Slabo 27px"; src: url("./assets/Slabo27px-Regular.ttf"); }

* {

font-family: 'slabo 27px', serif;

}
Best Regards, Damian

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags