Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #255652

    Sabih A
    Participant

    Hi team,

    Just wondered what your preferred method of importing all weights of a font are? I have switched the Custom Typography across our website to ‘Roboto’, which has 6 weights ranging from 100 – 900. I notice that only the weights selected for Logo, Headings, Navbar and Body in the customiser are imported into the site, so the others are not actually made available for use. For example I have certain Custom Headings I would like to style inline to be a lighter weight than what is set in the customiser.

    I did consider importing the entire Roboto font using Google’s CSS snippet in the Custom CSS box within the customiser, but this would mean that every page of my website would be calling the font twice which will harm performance. Do you have a better method to be able to import all the weights?

    Cheers,
    Sabih

    #255785

    Paul R
    Moderator

    Hi Sabih,

    You can turn off custom fonts under typography in the customizer and add your custom font manually by adding the code below
    under custom > css.

    
    @import url(http://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic);
    

    You can then add an inline css to your headlines

    http://screencast.com/t/tdt0hwtzIytF

    Hope that helps.

    #256609

    Sabih A
    Participant

    Ah great, I did consider that but was just wondering in case I missed something in the customiser. I will do as you suggested, though may perhaps leave out the Italicised fonts to reduce the server load.

    As usual, your support is beyond stellar. Thanks again team and keep up all the awe-inspiring work.

    Your biggest fan,
    Sabih

    #256741

    Nico
    Moderator

    Really happy to hear that!

    Let us know how our suggested solution goes so we could think of another way if there is.

    Thanks. Have a great day! 🙂