CommuterJoy » Logbook

« commuterjoy home

Posted by mattc at Jan 6, 09 05:05 AM

Posted by mattc at Jan 5, 09 05:05 AM

Posted by mattc at Jan 4, 09 05:05 AM

Posted by mattc at Dec 31, 08 05:05 AM

Posted by mattc at Dec 24, 08 05:05 AM

Posted by mattc at Dec 22, 08 05:05 AM

Posted by mattc at Dec 19, 08 05:05 AM

Posted by mattc at Dec 17, 08 05:05 AM

Posted by mattc at Dec 7, 08 07:11 PM ... Comments (0)

I noticed Opera have just shipped an alpha version of their next release that includes support for CSS3 web fonts, which amongst other things adds the ability to distribute fonts with your pages, TTF, OTF etc.

Most people use fonts to express the alphabet, punctuation etc. but typographers also ship some very pretty symbol typefaces known as dingbats.

Here's a demo of using an embedded dingbat typeface to add some bullet makers to a list via css3.

After setting up the font description,

@font-face {
  font-family: "Sarus";
  src: url("http://commuterjoy.co.uk/resources/ttf/sarus.ttf") format("truetype");
}

I can attach a letter to any node using the :before selector,

li:before {
 font-family: Sarus;
 font-size: 2em;
 content: "A";
 }

Then toggle the color & style of it using the :hover selector.

li:hover::before {
 color:red;
 content: "B";
 }

The best thing about native web fonts (unlike, say, image icons) is that they scale well and respond to standard CSS properties like 'color', 'font-weight', try upping the font size of the example.

Posted by mattc at Dec 5, 08 05:05 AM

Posted by mattc at Dec 3, 08 05:05 AM

Posted by mattc at Dec 1, 08 05:05 AM

Posted by mattc at Nov 28, 08 05:05 AM

Posted by mattc at Nov 27, 08 05:05 AM

Posted by mattc at Nov 26, 08 05:05 AM

random bookmark
link summary month January 2009 (3)
December 2008 (9)
November 2008 (16)
October 2008 (18)
September 2008 (11)
August 2008 (12)
July 2008 (20)
June 2008 (15)
May 2008 (27)
April 2008 (9)
March 2008 (10)
February 2008 (8)
January 2008 (8)
December 2007 (12)
November 2007 (10)
October 2007 (10)
September 2007 (6)
August 2007 (13)
July 2007 (8)
June 2007 (10)
May 2007 (12)
April 2007 (5)
March 2007 (12)
February 2007 (13)
January 2007 (22)
December 2006 (21)
November 2006 (28)
August 2006 (1)
category code (13)
food (4)
notes (3)
photo (18)
project (2)
quote (12)
sketch (13)
soup (10)
travel (2)