fonts

Google Fonts – nasty bold

Say you are using Google Web fonts for some CSS. Well, if you don’t include the correct bits you may encounter this problem.

Say, you use the Ubuntu font, for instance, and you have this in your <head>  block:

<link href="http://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet" type="text/css" />

Then, you use this font everywhere, and this includes a <th> section. You may find that the font displays like this:

Odd bold variant on Google Webfonts

Why has this happened? Well, its because you’ve not included the bold variant of the font in the header link.

For this particular font, it should be:

<link href="http://fonts.googleapis.com/css?family=Ubuntu:400,700" rel="stylesheet" type="text/css" />

700 is the bold variant. Once you’ve changed this, you should find that the bold is rendered correctly:

Fixed version of Google Webfont bold

Display CSS in its full style

I wanted to add a style to a div, but I was sure that our extensive CSS would have a class I could use, thus saving myself from increasing the size of the CSS file. However, how would I be able to view all the different styles and classes in the style they were assigned to? This would enable me to be able to quickly find the style I wanted and apply the class.

Couldn’t really find anything, so I quickly knocked one up.

http://css.tatedavies.com

Installing Tahoma font in Ubuntu

The stylesheet of our intranet is primarily Tahoma, and Firefox on Ubuntu doesn’t look good.

To install the Microsoft Core Fonts package in Ubuntu, run the following in your terminal:

sudo apt-get install msttcorefonts

And then this should go away and get them. Lovely.

NB, if this doesn’t take immediate effect, you can rebuild the font cache by running

sudo fc-cache -fv

Now, the Tahoma font is excluded these days from this package, so you’ll need to install that one manually, by following the instructions found here

Installing Tahoma font in Ubuntu

The stylesheet of our intranet is primarily Tahoma, and Firefox on Ubuntu doesn’t look good.

To install the Microsoft Core Fonts package in Ubuntu, run the following in your terminal:

sudo apt-get install msttcorefonts

And then this should go away and get them. Lovely.

NB, if this doesn’t take immediate effect, you can rebuild the font cache by running

sudo fc-cache -fv

Now, the Tahoma font is excluded these days from this package, so you’ll need to install that one manually, by following the instructions found here