font doesn't apply in ReactJS with Bootswatch

60 views Asked by At

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?

1

There are 1 answers

0
Meysam Asadi On

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');
}