Next.js Discord

Discord Forum

Issues using google font

Unanswered
Knopper gall posted this in #help-forum
Open in Discord
Knopper gallOP
It seems like I have been having issues today and yesterday with google font in my next 15 project, I haven't had any issues previously and my setup hasn't changed, I use the following imports in a css file:
@import url("https://fonts.googleapis.com");
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

1 Reply

Knopper gallOP
Update: it seems like google and/or next throws an error when importin this empty font line e.g
/*@import url("https://fonts.googleapis.com");*/


Not sure why this is now causing issues as this has been working for me for more than a year and I assumed google would have backward compatibility for this as this was an example on their own api if I recall correctly. This may be temporary I will test it out again in a few days.