comprar viagra online
comprar viagra generico barato
comprar cialis generico online
comprar cialis online seguro
Use a custom font on your website |
Webdesigners always have to make sure that they use a common font for their website, otherwise it'll display incorrect on browser that don't have the font installed. This can be really annoying if you want to use a nice custom font. You could load the font in Photoshop and save it as an image, but this isn't dynamic and is not SEO. Here are two solutions on how to make dynamic custom fonts. This is a dynamic custom fontUsing image replacementAnd is SEO proofThe font used above is called Diavlo and uses PHP Image Replacement. The other technique that you can use is sIFR. These can very good be used as attractive blog titles. PHP Image Replacement Original story at dezinerfolio.comAs you could see above, the dynamic text are all images. It uses PHP and JavaScript that replaces all the content in specified tags with images. For example, the dynamic tekst above uses the following code: <script type="text/JavaScript" src="ifr.js"></script>
It's as easy as that. Now your browser will display the custom font correct, while the code will stay intact. This is important for SEO. CustomizeYou can customize the files to your own needs. ifr.jsreplaceSelector(".title","ifr.php",true); var testURL = "test.png" ;
ifr.php$font_file = 'Diavlo.otf'; $font_size = 30 ; $font_color = '#000000' ; $background_color = '#ffffff' ; $transparent_background = true ; Change these values to your needs. Take note that the font_file is capital sensitive. Upload all files to your PHP host and open index.php. You should now be able to see the custom font displayed as images. Attached files:sIFR (Flash) The PHP Image Replacement works fine and is easy to install, but if you want more options (Selecting & copying the text, linking the replacement with an URL), you should take a look at sIFR. This works with Flash and doesn't need a PHP server. Importing sIFR is a little bit harder than the PHP Image Replacement. First, import the correct files (JavaScript and CSS). <link rel="stylesheet" href="sIFR-screen.css" type="text/css" media="screen" /> <script src="sifr.js" type="text/javascript"></script> <script src="sifr-addons.js" type="text/javascript"></script> Now put the <script type="text/javascript"> //<![CDATA[ if(typeof sIFR == "function") { sIFR.replaceElement("h2", "diavlo.swf", "#000000", null, null, null, 0, 0, 0, 0); }; //]]> </script> Now all the things placed in a Attached files:One final note: Don't use any of the above techniques to fully display your website in a custom font. It'll make your server slow due to heavy load and your readers will not like it. Good luck. Tags: custom font webdesign internet blog Interested in this topic? You might enjoy another article I've written called |
< Prev | Next > |
---|
Search |
---|
Or try the sitemap |