how to use google fonts



  • Hello everyone

    again my question, the previous one was poorly written

    I want to use google sources, I used to do it with css, but here it is a little different, since by default it is robotic

    Thank you
    Best regards

    for example:

    To embed a font, copy the code into the <head> of your html
    
    <link> @import
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@1,200&display=swap" rel="stylesheet">
    CSS rules to specify families
    
    font-family: 'Montserrat', sans-serif;
    


  • @eloy-silva
    This is to go into your src/css/app.styl

    body {
        font-family: 'Montserrat', sans-serif;
    }
    

    Uncomment the line roboto-font in quasar.conf.js

    extras: [
                // ctx.theme.mat ? 'roboto-font' : null,
                // 'roboto-font',
                'fontawesome-v5',
                'material-icons' // optional, you are not bound to it
                // 'ionicons-v4',
                // 'mdi-v3 ',
                // 'fontawesome-v5'
            ],
    
    

    Put you your link tags and what ever you need in your index.template.html (choose the fonts you need like 300i,400,700)

    <link href="https://fonts.googleapis.com/css?family=Montserrat:300i,400,700&display=swap" rel="stylesheet">
    
    

    There is also this link here explaining how to do it for offline use so you are not linking to it like https://fonts.googleapis.co ...
    https://forum.quasar-framework.org/topic/3201/completely-replace-roboto-with-another-font-v1

    The very last post.



  • @turigeza

    it worked perfectly
    Thank you

    😁

    font.jpg


Log in to reply