Wednesday, October 19, 2011

How to get more fonts for your post

I was wondering for a while if I could use other fonts than the 7 ones allowed when writing my posts. I finally found that it is indeed possible!

Here is how you do it:

Go on   http://www.google.com/webfonts#ChoosePlace:select . This is the google web fonts page. On there, you have countless of different fonts selection. You can just scroll through whatever fonts you like and click on : Add to collection

Once you have selected the ones you want, click on: use , at the bottom of the page.

Edit your blog as html and add this code (without the quotes) where you want your text to be in the chosen font:

" <link href="http://fonts.googleapis.com/css?family=name of font" rel="stylesheet" type="text/css"> 
  <div style="font-family: 'Font Name', serif;">Your text</div> "

And here you go!!

Note that when the name of the font is made of 2 words, instead of "name of font"on the first line of code you should write "word1+word2" while on the second line of code, instead of "Font Name" you should write "word1 word2"


And here is a concrete example using the Leckerli One font:

These code lines:

<link href="http://fonts.googleapis.com/css?family=Leckerli+One" rel="stylesheet" type="text/css"></link>
<div style="font-family: 'Leckerli One', serif;">
Here is the leckerli one font. </div>

Will give this output:


Here is the leckerli one font.





No comments:

Post a Comment