Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • So, suppose I would like to add a Chinese font (named “Noto Sans HK”) in my website, please kindly verify if the following is correct:

    THE FIRST STEP:
    in function.php, i added the following code:

    add_filter( 'avf_google_heading_font',  'avia_add_custom_font');
    add_filter( 'avf_available_google_fonts',  'avia_add_custom_font');
    function avia_add_custom_font($fonts)
    {
    $fonts['Noto Sans HK'] = 'Noto+Sans+HK:100,300,400,500,700,900&display=swap';
    return $fonts;
    }

    as you can see in the following picture:
    function.php

    THE SECOND STEP:
    in Enfold > General Styling > Quick CSS, add the following code:

    @import url('https://fonts.googleapis.com/css?family=Noto+Sans+HK:100,300,400,500,700,900&display=swap&subset=chinese-hongkong');
    
    font-family: 'Noto Sans HK', sans-serif;

    as you can see in the following picture:
    Enfold CSS section

    THE THIRD STEP:
    after the above coding, go to: Enfold > General Styling > fonts (tab), select the new Chinese font from the lists of “Heading Font” and “Font for your body text”,

    is this the correct steps?

    • This reply was modified 5 years, 3 months ago by koii123.

    Sorry, it seems nothing happened,
    I pasted the code in custom CSS,
    and i cannot find the Google Font from the list in “General Styling”.

    Any idea?

    • This reply was modified 5 years, 6 months ago by koii123.

    Thanks a lot, it works!

    in reply to: Cannot change font size #1112807

    It works!
    thanks for the advice!

Viewing 4 posts - 1 through 4 (of 4 total)