I've encountered an issue in my Rails project where I am utilizing two fonts from the /assets/fonts
directory.
@font-face {
font-family: FuturaStd-Light;
src: url("/assets/fonts/FuturaStd-Light.otf");
}
@font-face {
font-family: HelveticaNeue;
src: url("/assets/fonts//HelveticaNeue.dfont");
}
The font files are quite large, especially the second one, causing a significant delay in loading time. Additionally, on every page load, the text displays only after everything else has loaded completely.
I'm wondering if there is a more efficient way to load these fonts. Is there a method to cache them for quicker loading times? Any suggestions or solutions would be greatly appreciated.