• Resolved doozee

    (@doozee)


    Hi,
    I’m using to plugin to translate my website to Urdu language and it works absolutely perfect, so much better than WPML. However, I would like to change the default font for Urdu language only. I added the following function to my theme’s functions.php:

    function load_urdu_style()
    {
    if ( ‘ur’ == WPGlobus::Config()->language ) {
    wp_register_style( ‘urdu-style’, get_template_directory_uri() . ‘/css/urdu.css’, array(), ‘20120208’, ‘all’ );
    wp_enqueue_style( ‘urdu-style’ );
    }
    }
    add_action( ‘wp_enqueue_scripts’, ‘load_urdu_style’ );

    My css file looks like this:

    @font-face {
    font-family: urdu;
    src: url(Jameel.ttf);
    }

    body, p, a, h1, h2, h3, h4, h5, li, ol {
    font-family:urdu;
    font-size:16px;
    }

    I added Jameel.ttf in the same directory as the CSS file.

    This does not seem to work.

    https://ww.wp.xz.cn/plugins/wpglobus/

The topic ‘Change default font.’ is closed to new replies.