Ubuntu font

I find the new Ubuntu font very readable and will be using it for the main text of the site. The font is located at the Google Font Directory with instructions on how to include it on websites.

I added the following function to functions.php and hooked it to wp_head.

function ubuntu_font() {?>    <link href='http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold' rel='stylesheet' type='text/css'>
add_action('wp_head', 'ubuntu_font');

To use the font, just specify ‘Ubuntu’ as the font-family in CSS.

font-family: 'Ubuntu', serif;

2 thoughts on “Ubuntu font”

  1. That didn’t work for me because of the . I used this solution I hope it’s right. It seems to work thou.
    function sourcesans_font () {
    $fonturl = “”;
    echo $fonturl;

    add_action(‘wp_head’, ‘sourcesans_font’);

    and then in the CSS
    body {
    font-family: ‘Source Sans Pro’, sans-serif;

    body.custom-font-enabled {
    font-family: ‘Source Sans Pro’, sans-serif;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s