how to add font to my mreact js code example
Example 1: how to add custom font to react project
@font-face {
font-family: "AssistantRegular";
src: local("AssistantRegular"),
url("./fonts/assistant.regular.ttf") format("truetype");
font-weight: normal;
}
Example 2: how to add google fonts to css in react
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@700&display=swap');
at the top of css file