This answer is the updated version of @sudo bangbang's answer
1. Manually download the text package from Google Font
Head to any font that you wish to apply in your CSS, click the Download family to get a zip file.

Extract the zip file and move the folder into the src folder as below.

After that, refer to the below code, modify the src to the correct URL and put in the correct format. Here I used truetype, based on MDN
The available types are: "woff", "woff2", "truetype", "opentype", "embedded-opentype", and "svg".
The font-family attribute is the custom name. You can put any name you want.
@font-face {
font-family: 'primary-font';
src: url(./fonts//Sriracha/Sriracha-Regular.ttf) format('truetype');
}
.primary-font {
font-family: primary-font;
}
2. Install the package @fontsource
Since Typefaces project is now deprecated, we can use the alternative package by the same author FontSource
Let me use Poppins as an example.
First, download the package
npm install @fontsource/poppins --save
Next import the package in your index.js file
import "@fontsource/poppins";
Then use it as you wish
.primary-font {
font-family: "Poppins";
}
Supported font list is in this Github repo directory.
@font-facecss?@import url('https://fonts.googleapis.com/...')in my App.css but webpack won't pull the font files into the build. You mean by copying the contets of that import into my CSS file webpack will include the woff files etc. in the build?