View Single Post
  #5 (permalink)  
Old July 21st, 2010, 10:27 PM
chroniclemaster1 chroniclemaster1 is offline
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts

Originally Posted by p2p4life2 View Post
Thats great advice, thanks for the code, chroniclemaster! It works! Previously I did all kinds of workarounds to achieve text over image, like typing the text into the image via paint shop pro and then using that. The quality of the letters usually decreased though when the image was saved and used on the website. Oh well, no more.
It really is a beautiful technique. You can lay out whatever images you want to add texture and imagery to the website and still keep all the content in the XHTML file where anyone can access it. It avoids splitting your message between the XHTML and the images, and you can neatly avoid the text quality degradation that you've noticed.

PS Photoshop has the exact same problem; If you need to do something really special (like a homepage H1 title in distressed or very artistic font) I know a couple designers who actually export .psd files to Illustrator when they're finished to add text. Apparently that improves things a bit.

The other option which is accessible, but a bit more of a pain is to render your stylized text in Illustrator or Inkscape letter by letter (vector-based package is required, pixel-based editors don't typically produce good results). Just isolate each letter on it's own layer so you can produce each letter on it's own.

Then import the images into something like FontForge and have it trace the letters to generate a font from them (Note you can differentiate between a capital letter and a lower case, but you couldn't do two different Xs without messing with ligatures and things I don't know much about. Then you can embed your font into the page with Sifr. A little more work but really slick.

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of
A Growing History of our Planet, by our Planet, for our Planet.
Reply With Quote