nandorojo / solito

🧍‍♂️ React Native + Next.js, unified.
https://solito.dev
MIT License
3.54k stars 181 forks source link

Custom fonts started doesn't render custom fonts #151

Closed SleeplessByte closed 2 years ago

SleeplessByte commented 2 years ago

The custom fonts starter (https://custom-font.example.solito.dev/) does load the Font files (can be seen in the network tab) but doesn't actually initialize them, with a warning in the console about the fonts not being used and the rendered font using Segoe UI and Times New Roman respectively.

image

jonsherrard commented 2 years ago

This is due to a typo on https://github.com/nandorojo/solito/blob/master/example-monorepos/with-custom-font/apps/next/pages/_document.tsx#L14

You can update url to src as per the font-face spec and they will start working. Fernando probably had Inter installed locally so it didn't show up. :)

nandorojo commented 2 years ago

Good catch! https://github.com/nandorojo/solito/commit/5a3761f2aae1006b45578b2142911159a5459653