• Resolved luc333

    (@luc333)


    Hi,

    I’m using Translatepress for a website that supports both Mandarin and English. I would like to have a different font for h1, h2 and h3 in English.

    Here’s my edited code snippet based on another post but it’s not working.

    @import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap');

    h1.translatepress-en_US *{
    font-family: 'Noto Serif' !important;

    h2.translatepress-en_US *{
    font-family: 'Noto Serif' !important;
    }

    Appreciate some help. Thanks!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Madalina Ruzsa

    (@madalinaruzsa)

    Hi @luc333,

    There’s a small mistake in your code. If you want the h1 and h2 elements inside the translatepress-en_US body to have a different font, the code should be:

    @import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,100..900;1,100..900&display=swap');

    body.translatepress-en_US h1,
    body.translatepress-en_US h2 {
    font-family: 'Noto Serif', serif !important;
    }
Viewing 1 replies (of 1 total)

The topic ‘Custom font for 2nd language’ is closed to new replies.