Use custom font in quasar app

  • i want to add my custom font in quasar project, i tried to do this following this guide
    add-custom-fonts-to-your-app/2 , but it does not work for me, please help

    i copied font file to themes/fonts

    font-family myfont
    src url(fonts/Chilanka-Regular.ttf)

    .myclass {
    font-family: myfont;
    font-size: 30px

    whe use my class to an element, the font does not change

    Quasar CLI v0.6.2
    App running on Quasar v0.13.10

  • Did you look into the stylesheets that are generated using Chrome DevTools or something similar?
    Maybe your style definition gets overwritten by a definition with higher precedence.
    If the font could not be loaded you should also see a 404 error in the network tab.

  • ok, that was solved

    i forgot uncomment this in main.js

Log in to reply