I'm using Gilroy-Bold as my font and getting different results in figma than my react application. They are both used from the same source.
Figma:
My Laptop:
This how I'm implementing it.
@font-face {
font-family:'Gilroy-Bold';
src:url('/src/Gilroy/Gilroy-Bold.ttf');
}
.PPNameHeader{
color: #444BAB;
margin:0px;
margin-left: 6%;
font-size: 1.173rem;
font-family:Gilroy-Bold;
}
Path is correct as I went through my editor recommendation. Thing I have tried:
*{
font-family:'Gilroy-Bold';
src:url('/src/Gilroy/Gilroy-Bold.ttf');
}
Cleared my cache.
Incognito tab.
Restarted the development server and editor.
src
. You're using an absolute url, which can evaluate to different locations depending on the environment its in.src:url('/path/from/root/Gilroy-Bold.ttf'); /* absolute url */
src:url('./path/from/current/file/Gilroy-Bold.ttf'); /* relative url */
.PPNameHeader{
...
font-size: 1.173rem;
font-family: 'Gilroy-Bold';
}