Okay
  Public Ticket #2998490
Font mobile phone
Closed

Comments

  •  1
    Markus started the conversation

    Hello!

    I set the font to "roboto" in the "additional CSS" section. However, a different font is displayed on the mobile phone. How can I solve this?

    Thank you!

    Regards,
    Markus

  •  1,973
    Support replied

    Hi,

    The url of the site plz? is it this one - with just a splash screen

    https://derhacker.2ix.at/

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •  1
  •  1,973
    Support replied

    Hello,

    if you need to add a new font family without a plugin you need to enqueue the font syles in /include/scripts-config.php lines 33-42 follow the examples of the existing font files

    /*
    Translators: If there are characters in your language that are not supported
    by chosen font(s), translate this to 'off'. Do not translate into your own language.
    */
    if ( 'off' !== _x( 'on', 'Google font: on or off', 'rayden') ) {
    $rayden_main_font_url = add_query_arg( 'family', urlencode( 'Poppins:300,400,500,600,700' ), "//fonts.googleapis.com/css" );
    $rayden_secondary_font_url = add_query_arg( 'family', urlencode( 'Roboto Slab:300,400,500,600,700' ), "//fonts.googleapis.com/css" );
    }
    wp_enqueue_style( 'rayden-main-font', $rayden_main_font_url, array(), '1.0.0' );
    wp_enqueue_style( 'rayden-secondary-font', $rayden_secondary_font_url, array(), '1.0.0' );

    Let us know fi you have any questions

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •  1
    Markus replied

    When I change that in the maintheme, it will be gone after everywhere update right?

    Is there any possibility to make that change somewhere else?

    Thank you!

  •  1
    Markus replied

    Code worked. Thanks.

    But, again the question:

    When I change that in the maintheme, it will be gone after everywhere update right?

    Is there any possibility to make that change somewhere else?

  •  1,973
    Support replied

    Hi,

    following the example from functions.php of the parent theme you can enqueue the font files you need in the child theme (if you use one).

    The recommended way to make changes is the child theme but not all of our users are using it.

    We provide a child theme in our main archive, I attach it here for your convenience.

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •  1
    Markus replied

    Do I only copy this part, we spoke about, in the function.php file from the child-theme? 

  •  1,973
    Support replied

    No, you should adapt the code, something like (just out of my head):

    /*
    Translators: If there are characters in your language that are not supported
    by chosen font(s), translate this to 'off'. Do not translate into your own language.
    */
    if ( 'off' !== _x( 'on', 'Google font: on or off', 'rayden') ) {
          $my_font_url = add_query_arg( 'family', urlencode( 'Roboto:300,400,500,600,700' ), "//fonts.googleapis.com/css" );
    }
    wp_enqueue_style( 'rayden-custom-font', $my_font_url, array(), '1.0.0' );

    so this would in the functions.php of the child theme for Roboto - I hope you get the idea

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy