I created a React app using create-react-app
and chose to not eject. Currently, I'm trying to import a local font using @font-face
, but I'm not succeeding.
This is my current folder structure:
/
+ public/
+ src/
-- index.js
-- App.js
-- App.css
++ assets/
+++ css/
---- general.css
+++ fonts/
---- CircularStd-Medium.woff
On the App.js
, I'm importing general.css
file (import './assets/css/general.css';
).
On general.css
file, I'm setting the @font-face
as described below:
@font-face {
font-family: 'CircularStd-Medium';
font-style: normal;
src: local('CircularStd-Medium'), local('CircularStd-Medium'),
url('../fonts/CircularStd-Medium.woff') format('woff'),
}
I already tried following this answer, but it did't work. The code compiles, but a simple Times New Roman shows up.