Hey Everyone,
I want to add some custom / local fonts to my react project, can anyone tell me how to do it ?
Thanks
Hey Everyone,
I want to add some custom / local fonts to my react project, can anyone tell me how to do it ?
Thanks
For further actions, you may consider blocking this person and/or reporting abuse
Zane -
Voke -
William Kwadwo Owusu -
Skyler Dev -
Top comments (5)
using import.
import './index.css';
index.css :
@font-face {
font-family: 'MyFont';
src: local('MyFont'), url(./fonts/MyFont.woff) format('woff');
}
or u can import your index.html file with using tag.
Hey @ictekin
I have used this method but it doesn't worked.
can u show something ? I dont know what is wrong. But import must be work 100% percent. İf u search little bit u can find what u want.
Okay so here is my VScode ss,
dev-to-uploads.s3.amazonaws.com/i/...
dev-to-uploads.s3.amazonaws.com/i/...
dev-to-uploads.s3.amazonaws.com/i/...
can i see your js file ? where u wanna use it