I want to use a font from google-font in my newly created qwik project.
The steps I followed:
- since qwik applications doesn't have a index.html like react, I imported selected font into global.css file.
- tried to refer the font name on css's font-family property.
Expected result: I should able to refer the imported google font anywhere in a css file.
import google font inside global.css
Next you can use
font-family: 'Rokkitt', serif;anywhere inside your project.Also qwik have
root.tsxwhere you can put your scripts and styles in head or body according to your use cases.If you need to apply any changes in html element you can use
entry.ssr.tsxfileI have created a working examples for you and integrated google fonts