Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #786825

    Hello Enfold Team,
    I have tried to add code in functions.php in child theme , but still does not work.

    add_filter( 'avf_google_heading_font', 'avia_add_heading_font');
    function avia_add_heading_font($fonts)
    {
    $fonts['Noto Sans TC'] = 'Noto Sans TC:400,700';
    return $fonts;
    }
    
    add_filter( 'avf_google_content_font', 'avia_add_content_font');
    function avia_add_content_font($fonts)
    {
    
    $fonts['Noto Sans TC'] = 'Noto Sans TC:400,700,400italic,700italic';
    return $fonts;
    }

    Noto Sans TC (Chinese Traditional) is not at “fonts.google.com”
    The Noto Sans TC link is
    @import url (// fonts.googleapis.com/earlyaccess/notosanstc.css);

    what should I do?
    thank you.

    • This topic was modified 7 years, 8 months ago by AShinLiu.
    #787175

    Hey AShinLiu,

    I changed the code in functions.php file to following one

    function av_add_noto_sans() {
        wp_enqueue_style( 'Noto-Sans', '//fonts.googleapis.com/earlyaccess/notosanstc.css' );
    }
    add_action( 'wp_enqueue_scripts', 'av_add_noto_sans' );

    Please change font family on desired elements using custom CSS as following

    h1 { font-family: 'Noto Sans TC', sans-serif !important; }

    Best regards,
    Yigit

    #787523

    HI Yigit,

    It’s working. Thank you very much. :)

    #787561

    Hi,

    Glad to hear that! Thanks for using Enfold :)

    Best regards,
    Nikko

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to add Google Font "Noto Sans TC (Chinese Traditional)" to Enfold?’ is closed to new replies.