Great article! Your writing was very informative and easy to understand! ![]()
Thanks!
Kind regards,
Nick
I decided that I would use an extension I developed to implement a couple of font faces in the hopes that it would spruce things up a bit. The results were interesting: the blog went from being boxy and ho-hum to having a modern Asian vibe and all I did was use two fonts that are not, "web safe." In this article I'll cover what web safe is, what the alternatives are, why my decision not to use safe fonts is just fine, and what options there are for implementing pretty font faces in Joomla.
Web safe is a category of fonts that is thought to be installed on all computers. When a browser loads a site, it commonly uses fonts that are on the computer viewing the site in order to display the text. Different operating systems (Windows, Mac, Linux) have different available fonts and web safe is the common intersection among their installed fonts. Some examples of web safe fonts include: Verdana, Arial, Times, and Georgia. If a website requests a font that a computer doesn't have it defaults to the browser's choice of styling, ruining the design. The concept of web safe fonts has locked designers into working around a handful of fonts.
The Internet being as important a communication medium as it is, this situation couldn't last, and a few years ago alternatives to web safe fonts started to spring up.
The first mainstream alternative was sIFR, which uses a combination of javascript and Adobe Flash to replace text on the fly with fonts that are embedded into a flash file. sIFR was an enormous step forward, however it isn't perfect: pages load slower with this technique and Flash has to be installed in the browser (something certain popular smart phones don't use.)
After sIFR came Cufón, which uses javascript and the scalable vector graphics and no Flash, so it has broader device support. Cufón is quicker than sIFR, but has a drawback in that it still takes a javascript engine to work and that the speed of that engine will determine how quickly the font will display. On browsers running slowly, this leads to F.O.U.T., or Flash of Un-Styled Text. Additionally, Cufón allowed for using un-encrypted fonts which violates the license of most commercial fonts.
The most recent solution is to use the CSS @font-face rule. This is the way that it should have always been and all that this technique uses is the built in capabilities of your browser. Why wasn't it like this from the start? Popular browsers, as a whole, hadn't yet developed this functionality. Additionally, no one had figured out a consistent way to incorporate font face rules into a stylesheet in a manner that all browsers could understand (each having a different implementation.) Thankfully, both of these hurdles have been hopped by some very smart people and the web is starting to pop with pretty fonts.
No, all modern browsers support the technique I am using (@font-face) and most of them have supported it for several major versions. Additionally, you can always set fall-back fonts in your CSS and because of this there isn't a good reason not to improve your site design with sharper looking fonts.
The first option for using pretty fonts is to use a template that bakes them in. Shape5, JoomlArt, YooTheme, Joomla Bamboo, and Rocket Theme templates often come with Google Web Fonts available for use (a font delivery service that uses @font-face rules.)
The other option for implementing pretty fonts is to use an extension. In the Joomla Extension Directory, for Joomla 2.5, there are several plugins and components that make using pretty fonts possible. I'm not going to list them here, but many use Cufón, @font-face, and/or font delivery services. To see these, you can browse the typography category.
The advantage of using a template over using an extension is that you only need to install and manage one item: the template. The advantage to using an extension over a template is that you are not tied to that particular template or limited to what font implementation it offers. The only font delivery service that I've seen integrated in templates is Google Web Fonts and there are several others with thousands more fonts. Additionally, templates typically only allow for setting font faces for pre-designated elements (though this is actually a benefit for users less familiar with web design who don't understand CSS.)
I've skinned many custom templates and have disappointed as many designers by telling them that we needed to use a web safe font instead of what they had originally envisioned. However, that era has faded behind us with technology advancing far beyond our previous limitations; pretty fonts are no longer a risk and we can reliably use them. In the Joomla community, we're fortunate to have many choices in both templates and extensions for easily employing them and I encourage you to take advantage of this and browse the typography category of the JED or check out what your favorite template provider is offering.
I develop custom Joomla! extensions for a living and run two tiny companies: Blue Bridge Development, where I sell my services, and Code Haiku, which I use to release my extensions to the community.
I'm the author of the following extensions:
Hi John,
Glad to read this excellent article and to have your updates!
I wish you a nice time in Japan.
Kind regards,
aratypo
Hey Aratypo, great to see you on here.
Thanks for commenting. Japan is a little more expensive than I'm used to, but a lot of fun.
Hey John, great article. We use Google Web Fonts all the time (we used to use Cufon) but since CSS3 it's so much easier!
Hey Russell, that's how I started also. Cufon wasn't too hard to implement, but not nearly as nice as GWF. Google has really been a boon to open source.
Good article. There is also a font generator if you are doing straight coding http://www.fontsquirrel.com/fontface/generator
Joomlavi.com templates are mobile friendly and have the Google fonts installed as well. The support is pretty good too, if you don't mind skype at 3AM because the guy is in Vietnam. ![]()
Hey Eric thanks for adding these to the list, I haven't heard of Joomlavi.com.
I've used the Font Squirrel generator and it's pretty easy to set up. Definitely not as easy as using an extension or template, but still easy. A few things to be aware of using Font Squirrel: you need to be careful and use fonts that have licenses for web use (i.e. don't upload a font that you ripped out of Adobe Illustrator and think everything is legal because you own Illustrator) and self hosting fonts will cause them to be rendered slower than if you used a delivery service (Fonts.com, Google).