dcsimg

The Ugly Truth About the Web

Tired of Arial and Verdana? Add some sizzle to your Web pages with a new open source project that can render any font in a page. (Flash not required.)

If you’re single, male, and work with computers, I know a gal you have to meet. She’s worldly, well-educated, talented, and ambitious. Her looks? Well… let’s just say she has a great personality.

Who’s the gal?

Fellas, meet HTML.

While HTML has many virtues, what it produces isn’t very attractive. Text flow is restricted to a sole rectangle; bounding boxes are rectilinear; and text effects are practically non-existent. Worse—at least given the current state of Web browsers and associated standards—the entirety of human emotion, intellect, and creativity must be rendered in ten (or less) vanilla fonts (Arial, Courier New, Georgia, Lucida Console, Symbol, Tahoma, Times New Roman, Trebuchet, Verdana, and Zapf Dingbats). Ugh.

Somewhere, Giambatista Bodoni is spinning is his grave.

Standards? Ha!

And, alas, due to technical and legal complications, the Web is likely to remain a typographically monotonous place for the foreseeable future. It’s a catch-22. While CSS2 supports Web fonts, the feature remains largely untested because foundries, designers, developers, and operators have yet to find an equitable licensing scheme for typefaces. (Like other creative works, a typeface is protected by copyright. To use a typeface within a page, a site must have the right to publish it, making it available to all consumers.) Meanwhile, there’s little incentive to break the legal stalemate because applicable standards aren’t widely implemented, even years after ratification.

Moreover, and as type designer David Berlow mentions in his recent interview with A List Apart, existing standards are unimaginative, akin to “… a fourth-grader’s crayoning abilities: no shadows, in-lines, outlines, fill variety, twisting, perspective, set on a bouncing line, or opaque over another object, much less [motion.]”

Certainly, the dilemma is frustrating and explains why many turn to bitmaps and Flash to create compelling, exclusive, and signature site content.

For example, the Zen Garden replaces the text of headings with background images to achieve much of its eye candy. Other sites are implemented as Flash movies, and a very few employ a Flash variant named Scalable Inman Flash Replacement, or sIFR. According to its project page, “sIFR allows website headings, pull-quotes and other elements to be styled in whatever font the designer chooses, be that Foundry Monoline, Gill Sans, Impact, Frutiger, or any other font, without the user having it installed on [his] machine.” sIFR combines Flash, CSS, and JavaScript to conjure its magic, as shown in this recent demonstration.

While workable, both bitmaps and Flash are hardly ideal. The bitmap solution requires a unique asset for each heading, an unmanageable liability for a site with a great deal of dynamic or multilingual content. sIFR requires Flash, which is acceptable; however, sIFR is difficult to deploy and the results are less than spectacular.

Cue Up Cufón

So, what’s a designer and developer to do? Resort to chisel and stone? Lead type? PDF?

Sure, but before you break out your marble slab, Gutenberg press, or copy of Adobe Acrobat, try Cufón.

Cufón replaces text elements in a Web page with VML-rendered shapes in Internet Explorer or HTML version 5 canvas shapes in other browsers. The entire solution is driven via JavaScript, and the end-result is much the same as the bitmap solution—text is replaced by an image—although rendering is dynamic and need not be prefabricated.

Here’s how it works.

  • Assuming you have purchased the rights to embed a specific font in a Web page, you convert the font to JSON data via the Cufón Generator.

    You can use the Generator online or download the source code from GitHub and host the application yourself. The Generator can convert any TrueType (TTF), OpenType (OTF), Printer Font Binary (PFB) and PostScript font (additional formats may be supported in the future).

  • Next, you must include the Cufón renderer and your font in your Web application. The renderer is also provided as JavaScript.

    For example, if your font was named Rock Star, you would include two lines in the of your document.

    <!script src="javascripts/cufon-yui.js" type="text/javascript" />
    <!script src="javascripts/RockStar.font.js" type="text/javascript" />
    
  • Finally, to render the text, call the function Cufon.replace(elements, css) to render specific elements in the chosen font.

    The first argument, elements, is a CSS selector, such as h1, or you can combine Cufón with jQuery to use its complex element selectors. The second argument, css, is a collection of CSS attributes and must include the name of your font, such as { fontFamily: 'Rock Star' }. You can also specify color and other attributes.

During replacement, the chosen element is replaced by a VML or HTML 5 canvas and the text of the element(s) is rendered in the chosen font. Presto!

Fun with a Font

Let’s try it.

Dieter Steffmann is a type designer who permits his work to be embedded in Web pages. You can find a vast assortment of his type faces online. For this demonstration, I downloaded the font named Pinewood.

Open the Cufón Generator and select the TrueType version of the Pinewood font. Within the form, confirm you have permission to use the font on the Web, scroll to the bottom of the Generator form to accept the terms of the license, and click Submit. Shortly, you should have a file named Pinewood_400.font.js.

Create a new HTML file and include the Cufón renderer and your new font. Create an h1 heading and type “Welcome to Summer Camp!” Before the close of the body, write some JavaScript to replace each h1 with rendered text. Your final HTML should resemble something like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <title>
      Fun with a Font
      </title>

    <script src="javascripts/cufon-yui.js"
      type="text/javascript"></script>
    <script src="javascripts/Pinewood_400.font.js"
      type="text/javascript"></script>
  </head>

  <body>
    <h1>Welcome to Summer Camp!</h1>

    <script type="text/javascript">
      Cufon.replace('h1', { fontFamily: 'Pinewood' });
    </script>
  </body>
</html>

Open the file in your browser. The page should look like this (except your text will be black):

Text rendered in the browser in the Pinewood font

If you narrow or widen the page, the text should wrap appropriately. You can also use (some) CSS to stylize the text. For instance, the CSS snippet h1 {color: blue;} renders the text in the example blue.

It’s So Easy!

Cufón is simple to use and produces very nice results in all modern browsers, including Google Chrome and the latest build of Internet Explorer 8.

There are some caveats of course.

  • If you enlarge the type on the page via the browser’s application controls (for example, View > Zoom In in Safari), the text rendered by Cufón does not scale in proportion. To affect the size of rendered text, you must re-render it with new dimensions.
  • Similarly, any CSS attributes that affect the look of text after the page is initially drawn won’t work without special coding. For instance, the CSS h1:hover {color: red;} has no effect. You can, however, use events and JavaScript to achieve the equivalent programatically.
  • Embed only the ligatures you intend to use. The more ligatures you embed, the bigger the JavaScript font file becomes. The Generator provides options to include one, a custom few, some, reasonable subsets, or all ligatures of a typeface.

    Here, converting Pinewood, a typeface with only numerals and uppercase letters, results in a 140K (minified) file. (For comparison, the Cufón renderer itself is only 16K.)

  • At the moment, the word-spacing attribute is not supported and you cannot fully-justify text.

(You can find a list of all known issues on the Cufón GitHub page.)

All in all, Cufón has great promise and works out of the box today. Give it a try and make the Web a prettier place. Please.

Happy tinkering!

Comments on "The Ugly Truth About the Web"

cdcaveman

So is my understanding correct that it ends up rendering as a picture? for google indexing purposes i\’m asking. pictures are really considered nearly as legitimate content as text. so is this index able by google?

Reply
chrisadam2

If you’re single, male, and work with computers, I know a gal you have to meet. She’s worldly, well-educated, talented, and ambitious. Her looks? Well… let’s just say she has a great personality.

_______________________________________

Want to get-on Google’s first page and loads of traffic to your website? Hire a SEO Specialist from Ocean Groups [url=http://oceangroups.org/] seo pecialist [/url]

Reply

My developer is trying to convince me to move to .net from PHP.
I have always disliked the idea because of the costs. But he’s tryiong none the less.

I’ve been using WordPress on several websites for about a year and am concerned
about switching to another platform. I have heard fantastic things about blogengine.net.
Is there a way I can transfer all my wordpress posts into it?
Any kind of help would be greatly appreciated!

Reply

People are creating apps for everything; companies
are focusing on advertising and monetizing through mobile app
advertising and app purchase. Other advertising networks can reach your exact target audience.

app marketing.

Reply

Hi would you mind sharing which blog platform you’re using? I’m going to start my own blog in the near future but I’m having a hard time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique. P.S Sorry for getting off-topic but I had to ask!

Reply

Hello Nice Day to You, I just navigating the blog for try to find an stimulus or an motivating topic. Talented information, express gratitude for distribution. Michel

Reply

I gotta bookmark this site it seems extremely helpful very beneficial

Reply

We came across a cool web-site that you simply could possibly appreciate. Take a search if you want.

Reply

Wonderful story, reckoned we could combine a handful of unrelated information, nevertheless truly really worth taking a appear, whoa did 1 master about Mid East has got more problerms too.

Reply

Hey there. I found your website by way of Google while looking for a related matter, your site got here up. It appears great. I have bookmarked it in my google bookmarks to visit then.

Reply

I genuinely enjoy looking at on this web site, it has wonderful articles. “Never fight an inanimate object.” by P. J. O’Rourke.

Reply

Wonderful story, reckoned we could combine a few unrelated information, nevertheless really worth taking a look, whoa did a single understand about Mid East has got a lot more problerms at the same time.

Reply

R2fh6w jvsklyhhnydy, [url=http://fmewdpdwqltn.com/]fmewdpdwqltn[/url], [link=http://qosksplgssqx.com/]qosksplgssqx[/link], http://cusltlcojwzk.com/

Reply

Very few sites that take place to be in depth beneath, from our point of view are undoubtedly nicely worth checking out.

Reply

We came across a cool internet site that you may well love. Take a search for those who want.

Reply

One of our guests not long ago proposed the following website.

Reply

Hello Web Admin, I noticed that your On-Page SEO is is missing a few factors, for one you do not use all three H tags in your post, also I notice that you are not using bold or italics properly in your SEO optimization. On-Page SEO means more now than ever since the new Google update: Panda. No longer are backlinks and simply pinging or sending out a RSS feed the key to getting Google PageRank or Alexa Rankings, You now NEED On-Page SEO. So what is good On-Page SEO?First your keyword must appear in the title.Then it must appear in the URL.You have to optimize your keyword and make sure that it has a nice keyword density of 3-5% in your article with relevant LSI (Latent Semantic Indexing). Then you should spread all H1,H2,H3 tags in your article.Your Keyword should appear in your first paragraph and in the last sentence of the page. You should have relevant usage of Bold and italics of your keyword.There should be one internal link to a page on your blog and you should have one image with an alt tag that has your keyword….wait there’s even more Now what if i told you there was a simple WordPress plugin that does all the On-Page SEO, and automatically for you? That’s right AUTOMATICALLY, just watch this 4minute video for more information at. Seo Plugin

Reply

The Ugly Truth About the Web | Linux Magazine
[url=http://www.g0106qq421wwqx45eqqp6ykz017616szs.org/]uyrfksfnbq[/url]
ayrfksfnbq
yrfksfnbq http://www.g0106qq421wwqx45eqqp6ykz017616szs.org/

Reply

moncler italia boot bag, ski boots are specially made fоr skiers to email control inputs frоm thе skier to snow. But now increase іn popularity of ski sport, thе associated with ski boots changed. Mainly because were associated with leather and wеre expensive but it iѕ currently аvaіlаble in different material in affordable pace. Ski boot bag helps a person to carry уour ski boots easily.
scarpe air max 90 outlet

Reply

We have reported this classic black and red color Air Jordan 12 Flu Game will return engraved in 2016, following the exposure of internal information and article Nike finally determined before the date of the sale will be officially on sale May 28
cheap jordans for sale

Reply

I enjoy perusing your websites. Cheers!|
cheap oakley sunglasses outlet

Reply

But, functioning quality on the footwear continues to be maintained. Supplier has on average two century of good reputation. So, іt is not surprising how the ovеrall quality оf shoes are maintained whenever possible іn spite оf іts pricing. In addition quality, what you’re options оf colors, styles and varieties of footwear for the pick.
piumini moncler outlet

Reply

A Red Moncler “Xmas Edition” Down Jacket is oftеn a restricted edition jacket and priced at $209. The coloring red itself portrays thе a sense of style employed to design the jacket apt fоr the Christmas instance. This unique jacket is obtainable іn twо shades i really.e. red and black.
scarpe air max donne outlet

Reply

Who couldn’t use help in this economy? Using coupons can be a way to make the most of your budget. Use everything that you read ahead to see what you can do to start saving money, that way you will be in a better financial position in the future.
Fake Yeezys

Reply

As Air Jordan 12 series of the most classic color, following the return again in 2009 after the upper material and details or differ from 2009 models, and will not use nubuck leather uppers, but with the OG year version of the same leather material, disease face flag will not appear on the upper.
cheap retro jordans

Reply

My coder is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the expenses. But he’s tryiong none the less. I’ve been using Movable-type on a number of websites for about a year and am concerned about switching to another platform. I have heard fantastic things about blogengine.net. Is there a way I can import all my wordpress posts into it? Any help would be greatly appreciated!|
oakley cheap

Reply

Many people are advocating the usefulness of coupons. There are websites dedicated to the practice of couponing, and coupon experts eager to initiate you into the fold. Like anything that’s worth doing, though, getting the most out coupons requires a little bit of planning and work. This article will assist you if you wish to save money with coupons.
Yeezy Replica

Reply

Every brand possesses its own characteristics, thеу аll want tо use material, with advanced technology. Many people from thе semblance judgment, оr selling. In mу opinion, I thіnk Moncler jackets, іs thе most excellent. Choose iѕ nоt simple, evеn juѕt we alwауѕ wаnt obtain sоmе moncler leg protection.
scarpe air max outlet

Reply

This site was… how do you say it? Relevant!! Finally I have found something that helped me. Thank you!
ray ban polarizada

Reply

Hello would you mind stating which blog platform you’re using? I’m going to start my own blog soon but I’m having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something unique. P.S Sorry for getting off-topic but I had to ask!|
cheap oakley sunglasses

Reply

Maybe happen tо bе on moncler italia the hunt оf а coach bag, and you have deep interest in fashion but also face funds problem. Coach bags will prоbably be your firѕt choice with no doubt, simply bеcauѕе they not onlу саn match your fashion neеd but also hаvе a reasonable total price.
Moncler outlet

Reply

At this time it sounds like Expression Engine is the preferred blogging platform out there right now. (from what I’ve read) Is that what you’re using on your blog?
Dw27 Air Jordan 3 III Retro Basket Nero Luminoso Crimson In Vend

Reply

I could not resist commenting. Perfectly written!|
cheap oakley sunglasses

Reply

I like the helpful information you provide in your articles. I’ll bookmark your blog and check again here frequently. I am quite certain I’ll learn a lot of new stuff right here! Good luck for the next!
occhiali da vista oakley 2013

Reply

Moncler standing in the latest fashion. It сan be more bright-coloured sumptuous luxuries. Whatever down jacket Balenciaga оr intelligence bag design and fendi, havе perfect Moncler. Moncler found hіs vast development space Junya cooperation, etc Wsatanabe аnd beams apparel brands, particularly the uѕe of ѕome high gloss color, mоre and very popular аmоng young people.
piumini moncler

Reply

Hi there! Do you use Twitter? I’d like to follow you if that would be okay. I’m undoubtedly enjoying your blog and look forward to new posts.|
really cheap oakleys

Reply

I am sure this piece of writing has touched all the internet users, its really really nice piece of writing on building up new weblog.
oakley a frame lense

Reply

Is that true? Ill spread this information. Anyway, nice posting.
???

Reply

I would like to thank you for the efforts you have put in penning this website. I am hoping to check out the same high-grade blog posts by you later on as well. In truth, your creative writing abilities has inspired me to get my very own blog now ;)
nike sneakers $40

Reply

I’m not sure where you are getting your information, but good topic. I needs to spend some time learning more or understanding more. Thanks for excellent info I was looking for this information for my mission.|
cheap oakley sunglasses

Reply

I am really inspired along with your writing talents and also with the structure for your weblog. Is that this a paid subject matter or did you modify it your self? Either way stay up the nice quality writing, it’s rare to look a great weblog like this one today..|
oakley sunglasses cheap

Reply

I like what you guys are up too. This type of clever work and exposure! Keep up the wonderful works guys I’ve added you guys to my personal blogroll.|
nike free kids nike free run herre

Reply

Hello friends, how is everything, and what you desire to say concerning this post, in my view its genuinely awesome designed for me.
occhiali ray ban 50 euro

Reply

Thank you for the good writeup. It in fact was a entertainment account it. Look complex to more brought agreeable from you! However, how can we keep up a correspondence?|
nike free 5.0 2015 nike run free

Reply

Howdy! Someone in my Facebook group shared this site with us so I came to give it a look. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Terrific blog and wonderful design and style.|
nike free run norge nike free run dame billig

Reply

I rarely leave a response, but i did a few searching and wound up here %BLOG_TITLE%. And I actually do have 2 questions for you if it’s allright. Could it be simply me or does it appear like some of these comments look as if they are written by brain dead people? :-P And, if you are posting at additional online social sites, I would lie to follow anything fresh you have to post. Would you make a list of all of all your shared sites like your twitter feed, Facebook page or linkedin profile?
Spacecraft Ultra Beanie – Gorgeous

Reply

Is that true? Ill spread this information. Anyway, nice posting.
??

Reply

If you would like to take a great deal from this paragraph then you have to apply these techniques to your won website.|
nike free run 3 dame nike free sko

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>