0

I tried many solutions for applying this font but it still not working.

 @font-face {
   font-family: 'Samim';
   src: local('Samim'), url(./resources/fonts/Samim.ttf) format('truetype');
   font-weight: 900;
 }

.App {
  font-family: Samim;
  text-align: center;
  text-align: center;
  height: 100vh;
}

i use bootswatch for styling . should i modify bootstrap.min.css or install something to solve my problem?

Marzieh Mousavi
  • 1,213
  • 1
  • 12
  • 28
  • 1
    Does this answer your question? [Import fonts-face on styled component ReactJS](https://stackoverflow.com/questions/61076453/import-fonts-face-on-styled-component-reactjs) – Majid Hosseini Feb 21 '21 at 14:27
  • I saw it but I do not use styled component and their solutions did not work for me. – Marzieh Mousavi Mar 04 '21 at 16:31

1 Answers1

0

In style, I use the following structure to define the font. try this

@font-face {
    font-family: Samim;
    font-style: normal;
    font-weight: 900;
    url('../resources/fonts/Samim.ttf') format('truetype');
}
Meysam Asadi
  • 6,438
  • 3
  • 7
  • 17